[ADD] mail_tracking_mass_mailing
==============================
Mail tracking for mass mailing
==============================
Links mail statistics objects with mail tracking objects.
Installation
============
This addon will be automatically installed when 'mail_tracking' and
'mass_mailing' are both installed
Usage
=====
From mail statistic object, you can see:
- Email tracking state
- Email related tracking object
- Email related tracking events
From mass mailing contact, you can see:
- Email score, in order to clean up your lists from bad score emails
As a bonus feature, you have a new checkbox 'Avoid resend' in mass mailing,
in order to not send twice the same email to the same recipient. This is very
useful when you want to resend the mass mailing after changing selection
recipients. Notice that recipient selection could be a domain over a model, so
result ids could change over the time. With this flag you can send
the same email several times but only once to each recipient.
When this method is called without an event (a.k.a. `event=None`), this method produces the following error:
```
Traceback (most recent call last):
File "/opt/odoo/auto/addons/mail/models/mail_mail.py", line 278, in send
res = IrMailServer.send_email(msg, mail_server_id=mail.mail_server_id.id)
File "/opt/odoo/auto/addons/mail_tracking/models/ir_mail_server.py", line 88, in send_email
tracking_email.smtp_error(self, smtp_server_used, e)
File "/opt/odoo/auto/addons/mail_tracking/models/mail_tracking_email.py", line 213, in smtp_error
self.sudo()._partners_email_bounced_set('error')
File "/opt/odoo/auto/addons/mail_tracking/models/mail_tracking_email.py", line 203, in
_partners_email_bounced_set
]).email_bounced_set(self, reason, event=event)
File "/opt/odoo/auto/addons/mail_tracking_mailgun/models/res_partner.py", line 22, in
email_bounced_set
self._email_bounced_set(reason, event)
File "/opt/odoo/auto/addons/mail_tracking_mailgun/models/res_partner.py", line 33, in
_email_bounced_set
event['Message-Id'] or '') TypeError: 'NoneType' object has no attribute '__getitem__'
```
So, we now assume we do not always have an event.