diff options
| author | Florimond Husquinet (fhu) <fhu@odoo.com> | 2019-11-21 15:47:14 +0000 |
|---|---|---|
| committer | Thibault Delavallée <tde@odoo.com> | 2019-12-02 15:34:14 +0000 |
| commit | 30cd679b8157f70c84d7d8664e773d106525c02d (patch) | |
| tree | 1f57325ff191e180522233d6af93127023b032a0 | |
| parent | 88145eb645777b7292b1120c632ae75fdf3f4779 (diff) | |
[IMP] sms: allow to send SMS to oneself
Currently discuss post (through mail or sms) does not allow the author
to be notified of its content, as
* he posted it and is therefore already updated;
* it could create email loops;
However with SMS one could easily try to send SMS to himself using the
sms composer that is different from the mail composer. In that case
just use the ``mail_notify_author`` context key allowing to bypass the
"no author notification" rule.
Task ID 2091685
PR #40650
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
| -rw-r--r-- | addons/sms/wizard/sms_composer.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/addons/sms/wizard/sms_composer.py b/addons/sms/wizard/sms_composer.py index 413d6410f46..95ce504a96f 100644 --- a/addons/sms/wizard/sms_composer.py +++ b/addons/sms/wizard/sms_composer.py @@ -314,4 +314,6 @@ class SendSMS(models.TransientModel): records = self.env[self.res_model].browse(self.res_id) else: records = self.env[self.res_model].browse(literal_eval(self.res_ids or '[]')) + + records = records.with_context(mail_notify_author=True) return records |
