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/sms/models/mail_message.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/sms/models/mail_message.py')
| -rw-r--r-- | addons/sms/models/mail_message.py | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/addons/sms/models/mail_message.py b/addons/sms/models/mail_message.py index 92fda5e8a83..9e79500e9c0 100644 --- a/addons/sms/models/mail_message.py +++ b/addons/sms/models/mail_message.py @@ -19,7 +19,6 @@ class MailMessage(models.Model): 'Has SMS error', compute='_compute_has_sms_error', search='_search_has_sms_error', help='Has error') - @api.multi def _compute_has_sms_error(self): sms_error_from_notification = self.env['mail.notification'].sudo().search([ ('notification_type', '=', 'sms'), @@ -28,13 +27,11 @@ class MailMessage(models.Model): for message in self: message.has_error = message in sms_error_from_notification - @api.multi def _search_has_sms_error(self, operator, operand): if operator == '=' and operand: return ['&', ('notification_ids.notification_status', '=', 'exception'), ('notification_ids.notification_type', '=', True)] raise NotImplementedError() - @api.multi def _format_mail_failures(self): """ A shorter message to notify a SMS delivery failure update @@ -62,7 +59,6 @@ class MailMessage(models.Model): res.append(info) return res - @api.multi def _notify_sms_update(self): """ Send bus notifications to update status of notifications in chatter. Purpose is to send the updated status per author. @@ -88,7 +84,6 @@ class MailMessage(models.Model): ] for author, author_messages in groupby(messages, itemgetter('author_id'))] self.env['bus.bus'].sendmany(updates) - @api.multi def message_format(self): """ Override in order to retrieves data about SMS (recipient name and SMS status) |
