diff options
| author | Xavier Morel <xmo@odoo.com> | 2020-06-17 06:22:08 +0000 |
|---|---|---|
| committer | Xavier Morel <xmo@odoo.com> | 2020-06-17 11:28:54 +0000 |
| commit | 0d6bb14cfda0030936311b41c4313e00afe1034b (patch) | |
| tree | b9292bfebc2ba775cdc0baa9135b8e640283f897 /addons/sms/models | |
| parent | 5f310366a099e846066ba3190e2b42daa04e165b (diff) | |
[IMP] base, sms, mail: change calling conventions of server action runners
Taking a self and a separate action seems unnecessary given self *is
an action*.
Only do this change for the "new" naming scheme, so the old one keeps
working as-is.
Diffstat (limited to 'addons/sms/models')
| -rw-r--r-- | addons/sms/models/ir_actions.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/addons/sms/models/ir_actions.py b/addons/sms/models/ir_actions.py index dddaa885d74..48c71a9d2f9 100644 --- a/addons/sms/models/ir_actions.py +++ b/addons/sms/models/ir_actions.py @@ -26,9 +26,9 @@ class ServerActions(models.Model): if action.state == 'sms' and not action.model_id.is_mail_thread: raise ValidationError(_("Sending SMS can only be done on a mail.thread model")) - def _run_action_sms_multi(self, action, eval_context=None): + def _run_action_sms_multi(self, eval_context=None): # TDE CLEANME: when going to new api with server action, remove action - if not action.sms_template_id or self._is_recompute(action): + if not self.sms_template_id or self._is_recompute(): return False records = eval_context.get('records') or eval_context.get('record') @@ -39,8 +39,8 @@ class ServerActions(models.Model): default_res_model=records._name, default_res_ids=records.ids, default_composition_mode='mass', - default_template_id=action.sms_template_id.id, - default_mass_keep_log=action.sms_mass_keep_log, + default_template_id=self.sms_template_id.id, + default_mass_keep_log=self.sms_mass_keep_log, ).create({}) composer.action_send_sms() return False |
