summaryrefslogtreecommitdiff
path: root/addons/mass_mailing/models/mail_thread.py
diff options
context:
space:
mode:
authorThibault Delavallée <tde@odoo.com>2017-09-13 17:00:22 +0200
committerYannick Tivisse <yti@odoo.com>2017-09-15 15:56:23 +0200
commitd6355477601eb9fcd04d0c5ee7950bd84a92c664 (patch)
treea0697c18fc10cae1c1f4b419ae0e62a6295e3a48 /addons/mass_mailing/models/mail_thread.py
parent51b5ee7c3c1bbc08c5aa284300fd95f63cbf7ad1 (diff)
[IMP] mass_mailing: consider replying to an email imply opening it
Currently when people answers an email its statistics are set to replied updating its replied field. However if the blank gif used to track the opening fails for whatever reason we could have mail considered as replies but not opened. We consider that it is not common to reply to an email people did not open. Let us therefore set a replied email as also opened.
Diffstat (limited to 'addons/mass_mailing/models/mail_thread.py')
-rw-r--r--addons/mass_mailing/models/mail_thread.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/addons/mass_mailing/models/mail_thread.py b/addons/mass_mailing/models/mail_thread.py
index ee5fb45f6eb..8e4ee298c67 100644
--- a/addons/mass_mailing/models/mail_thread.py
+++ b/addons/mass_mailing/models/mail_thread.py
@@ -37,6 +37,7 @@ class MailThread(models.AbstractModel):
matching message_id in mail.mail.statistics. """
if message.get('References'):
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)
return super(MailThread, self).message_route_process(message, message_dict, routes)