diff options
| author | Christophe Simonis <chs@odoo.com> | 2017-07-20 11:48:49 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2017-07-20 11:48:49 +0200 |
| commit | fa3e89064a503c95ab2b283e5d5b39ca182f8f47 (patch) | |
| tree | d638f0cb99fc973169d670ff0bafd1b9474b4771 /addons/mass_mailing/models/mail_thread.py | |
| parent | 0ae679e433ee4c5ca32ae1302d87d7fb33e0c78d (diff) | |
| parent | 104dfe3c07d36a6487f045f31d0999cc429cb5bb (diff) | |
[MERGE] forward port branch saas-16 up to 104dfe3c07d
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) |
