summaryrefslogtreecommitdiff
path: root/addons/mass_mailing/models/mail_thread.py
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2018-08-14 18:59:57 +0200
committerChristophe Simonis <chs@odoo.com>2018-08-14 18:59:57 +0200
commit27d8daf8a75845fa1e23676b91776a0e0a8b5165 (patch)
tree694cd02026146755eaa49051f2e75a0839bee38c /addons/mass_mailing/models/mail_thread.py
parent4f69be7eadbcde6d9f65427877e29b17e5b19bfe (diff)
parent51225c9b9f20c59eac1cd2ac117f9899ee76e391 (diff)
[MERGE] forward port branch 11.0 up to 51225c9b9f2
Diffstat (limited to 'addons/mass_mailing/models/mail_thread.py')
-rw-r--r--addons/mass_mailing/models/mail_thread.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/mass_mailing/models/mail_thread.py b/addons/mass_mailing/models/mail_thread.py
index 8e4ee298c67..f26aee7ff4a 100644
--- a/addons/mass_mailing/models/mail_thread.py
+++ b/addons/mass_mailing/models/mail_thread.py
@@ -35,7 +35,7 @@ class MailThread(models.AbstractModel):
""" Override to update the parent mail statistics. The parent is found
by using the References header of the incoming message and looking for
matching message_id in mail.mail.statistics. """
- if message.get('References'):
+ if message.get('References') and routes:
message_ids = [x.strip() for x in decode_smtp_header(message['References']).split()]
self.env['mail.mail.statistics'].set_opened(mail_message_ids=message_ids)
self.env['mail.mail.statistics'].set_replied(mail_message_ids=message_ids)