From d6355477601eb9fcd04d0c5ee7950bd84a92c664 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Wed, 13 Sep 2017 17:00:22 +0200 Subject: [PATCH] [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. --- addons/mass_mailing/models/mail_thread.py | 1 + 1 file changed, 1 insertion(+) 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)