diff options
| author | Christophe Simonis <chs@odoo.com> | 2017-07-19 17:04:28 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2017-07-19 17:04:28 +0200 |
| commit | b31cd558e544edd5bce5a821939639fcadffa7bf (patch) | |
| tree | e057f748053d589da643016f7c9a844ac1fb3c36 /addons/mass_mailing/models/mail_thread.py | |
| parent | 6a61921dddb3b886947cba7eac1122dd964dcbcd (diff) | |
| parent | b857fd4c905c39c187fff2e533e5ff6714a4aec0 (diff) | |
[MERGE] forward port branch saas-14 up to b857fd4c905
Diffstat (limited to 'addons/mass_mailing/models/mail_thread.py')
| -rw-r--r-- | addons/mass_mailing/models/mail_thread.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/addons/mass_mailing/models/mail_thread.py b/addons/mass_mailing/models/mail_thread.py index 8e515a664f8..ee5fb45f6eb 100644 --- a/addons/mass_mailing/models/mail_thread.py +++ b/addons/mass_mailing/models/mail_thread.py @@ -39,3 +39,13 @@ class MailThread(models.AbstractModel): message_ids = [x.strip() for x in decode_smtp_header(message['References']).split()] self.env['mail.mail.statistics'].set_replied(mail_message_ids=message_ids) return super(MailThread, self).message_route_process(message, message_dict, routes) + + @api.multi + def message_post_with_template(self, template_id, **kwargs): + # avoid having message send through `message_post*` methods being implicitly considered as + # mass-mailing + no_massmail = self.with_context( + default_mass_mailing_name=False, + default_mass_mailing_id=False, + ) + return super(MailThread, no_massmail).message_post_with_template(template_id, **kwargs) |
