[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>
This commit is contained in:
@@ -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'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user