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/res_users.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/res_users.py')
| -rw-r--r-- | addons/mail/models/res_users.py | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/addons/mail/models/res_users.py b/addons/mail/models/res_users.py index c7c21420585..07be8de63ee 100644 --- a/addons/mail/models/res_users.py +++ b/addons/mail/models/res_users.py @@ -41,7 +41,6 @@ class Users(models.Model): out_of_office_message = fields.Char(string='Message') @api.depends('moderation_channel_ids.moderation', 'moderation_channel_ids.moderator_ids') - @api.multi def _compute_is_moderator(self): moderated = self.env['mail.channel'].search([ ('id', 'in', self.mapped('moderation_channel_ids').ids), @@ -52,7 +51,6 @@ class Users(models.Model): for user in self: user.is_moderator = user in user_ids - @api.multi def _compute_moderation_counter(self): self._cr.execute(""" SELECT channel_moderator.res_users_id, COUNT(msg.id) @@ -93,7 +91,6 @@ GROUP BY channel_moderator.res_users_id""", [tuple(self.ids)]) self.env['mail.channel'].search([('group_ids', 'in', user.groups_id.ids)])._subscribe_users() return user - @api.multi def write(self, vals): write_res = super(Users, self).write(vals) sel_groups = [vals[k] for k in vals if is_selection_groups(k) and vals[k]] @@ -159,7 +156,6 @@ class res_groups_mail_channel(models.Model): _inherit = 'res.groups' _description = 'Access Groups' - @api.multi def write(self, vals, context=None): write_res = super(res_groups_mail_channel, self).write(vals) if vals.get('users'): |
