summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThibault Delavallée <tde@odoo.com>2019-01-09 16:28:58 +0000
committerThibault Delavallée <tde@odoo.com>2019-04-08 12:39:41 +0000
commitebba721130b9887f67d4fefc9ec4855d12634cb6 (patch)
treef931eff9356bb768fb287cdc23957b83aff5005e
parentb0491c44457eef3daacc906802340589cdd87d68 (diff)
[FIX] mass_mailing: fix statistic state computation
Replied / Bounced / Opened states should be computed prior to Sent state. Indeed Sent is the default state once the email is sent. Then replied, bounced and opened are states that happen after sending the email. It is therefore necessary to re-order the state computation to correctly compute the statistic state. Related to task ID 1924711 Linked to PR #32496 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
-rw-r--r--addons/mass_mailing/models/mass_mailing_stats.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/mass_mailing/models/mass_mailing_stats.py b/addons/mass_mailing/models/mass_mailing_stats.py
index 662b6adbaaf..f0d8a763438 100644
--- a/addons/mass_mailing/models/mass_mailing_stats.py
+++ b/addons/mass_mailing/models/mass_mailing_stats.py
@@ -66,14 +66,14 @@ class MailMailStats(models.Model):
stat.state = 'ignored'
elif stat.exception:
stat.state = 'exception'
- elif stat.sent:
- stat.state = 'sent'
elif stat.opened or stat.clicked:
stat.state = 'opened'
elif stat.replied:
stat.state = 'replied'
elif stat.bounced:
stat.state = 'bounced'
+ elif stat.sent:
+ stat.state = 'sent'
else:
stat.state = 'outgoing'