diff options
| author | Adrian Torres <adt@odoo.com> | 2019-07-10 14:59:37 +0200 |
|---|---|---|
| committer | Adrian Torres <adt@odoo.com> | 2019-07-17 14:13:12 +0200 |
| commit | 4b38cc6590abcb58a0ca102a06063eb3db7ac1f4 (patch) | |
| tree | cfd11739fc6b4c0cb4b23b54cc6badad4bf5c55e /addons/mail/models/mail_alias.py | |
| parent | f6fdde96bddfedf8764cd8a73089e44340d476ae (diff) | |
[REM] *: calls to @api.multi
Multi is the default api for methods, it is not necessary to explicitly
decorate methods with it, adds clutter and most people use it because
they see that the rest of the code uses it.
Done with `find . -type f -name '*.py' | xargs sed -i '/@api.multi/d'`
Diffstat (limited to 'addons/mail/models/mail_alias.py')
| -rw-r--r-- | addons/mail/models/mail_alias.py | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/addons/mail/models/mail_alias.py b/addons/mail/models/mail_alias.py index ecf03c3c5a3..2a8b9c6bde8 100644 --- a/addons/mail/models/mail_alias.py +++ b/addons/mail/models/mail_alias.py @@ -73,7 +73,6 @@ class Alias(models.Model): ('alias_unique', 'UNIQUE(alias_name)', 'Unfortunately this email alias is already used, please choose a unique one') ] - @api.multi def _get_alias_domain(self): alias_domain = self.env["ir.config_parameter"].sudo().get_param("mail.catchall.domain") for record in self: @@ -107,14 +106,12 @@ class Alias(models.Model): vals['alias_parent_model_id'] = model.id return super(Alias, self).create(vals) - @api.multi def write(self, vals): """"give a unique alias name if given alias name is already assigned""" if vals.get('alias_name') and self.ids: vals['alias_name'] = self._clean_and_make_unique(vals.get('alias_name'), alias_ids=self.ids) return super(Alias, self).write(vals) - @api.multi def name_get(self): """Return the mail alias display alias_name, including the implicit mail catchall domain if exists from config otherwise "New Alias". @@ -154,7 +151,6 @@ class Alias(models.Model): name = re.sub(r'[^\w+.]+', '-', name) return self._find_unique(name, alias_ids=alias_ids) - @api.multi def open_document(self): if not self.alias_model_id or not self.alias_force_thread_id: return False @@ -165,7 +161,6 @@ class Alias(models.Model): 'type': 'ir.actions.act_window', } - @api.multi def open_parent_document(self): if not self.alias_parent_model_id or not self.alias_parent_thread_id: return False @@ -212,7 +207,6 @@ class AliasMixin(models.AbstractModel): record.alias_id.sudo().write(record.get_alias_values()) return record - @api.multi def unlink(self): """ Delete the given records, and cascade-delete their corresponding alias. """ aliases = self.mapped('alias_id') |
