Commit Graph

11 Commits

Author SHA1 Message Date
hveficent
5892f7db62 [IMP] mail_tracking_mailgun: black, isort 2022-05-17 17:16:14 -03:00
David
167d0352ce [IMP] mail_tracking_mailgun: link to bounce event 2022-05-17 17:16:14 -03:00
ernesto
47dac3e38f [MIG] mail_tracking_mailgun: Migration to 12.0 2022-05-17 17:16:14 -03:00
David
85beba204f [FIX] mail_tracking_mailgun: alternative domain
- In case the sending domain is different from the one configured in the
mail.domain.catchall setting.
2022-05-17 17:16:14 -03:00
Sergio Teruel Albert
3deee37c61 [11.0][FIX] mail_tracking_mailgun: Read config parameters with sudo 2022-05-17 17:16:14 -03:00
David
ccee1257d8 [MIG] mail_tracking_mailgun: Migration to 11.0 2022-05-17 17:16:14 -03:00
David
88f0f2d292 [IMP] mail_tracking_mailgun: validation auto check
- Configurable partner email auto check.
2022-05-17 17:16:14 -03:00
Pedro M. Baeza
07e9a8ac54 [FIX] mail_tracking_mailgun: Message error on bounce 2022-05-17 17:16:14 -03:00
Jairo Llopis
a43bfa843a [FIX] mail_tracking_mailgun: Avoid errors without event
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.
2022-05-17 17:16:14 -03:00
David
112ed9a274 [10.0][FIX] mail_tracking_mailgun: Avoid key dict errors 2022-05-17 17:16:14 -03:00
David
3ca3ee4e49 [10.0][IMP] mail_tracking_mailgun: add partner mail checks 2022-05-17 17:16:13 -03:00