diff --git a/mail_tracking_mailgun/__manifest__.py b/mail_tracking_mailgun/__manifest__.py index f271654f..0ebb5b20 100644 --- a/mail_tracking_mailgun/__manifest__.py +++ b/mail_tracking_mailgun/__manifest__.py @@ -7,7 +7,7 @@ { "name": "Mail tracking for Mailgun", "summary": "Mail tracking and Mailgun webhooks integration", - "version": "10.0.1.1.1", + "version": "10.0.1.1.2", "category": "Social Network", "website": "https://odoo-community.org/", "author": "Tecnativa, " diff --git a/mail_tracking_mailgun/models/res_partner.py b/mail_tracking_mailgun/models/res_partner.py index 9644e918..77f284e2 100644 --- a/mail_tracking_mailgun/models/res_partner.py +++ b/mail_tracking_mailgun/models/res_partner.py @@ -30,8 +30,7 @@ class ResPartner(models.Model): body = _('Email has been bounced: %s\n' 'Reason: %s\n' 'Event: %s') % (partner.email, reason, - event and event.get('Message-Id', - _('unknown'))) + event and event.id or _('unknown')) partner.message_post(body=body) @api.multi diff --git a/mail_tracking_mailgun/tests/test_mailgun.py b/mail_tracking_mailgun/tests/test_mailgun.py index 4180a8d6..560e9399 100644 --- a/mail_tracking_mailgun/tests/test_mailgun.py +++ b/mail_tracking_mailgun/tests/test_mailgun.py @@ -392,7 +392,7 @@ class TestMailgun(TransactionCase): self.partner._email_bounced_set('test_error', self.event) self.assertEqual(len(self.partner.message_ids), message_number) self.partner.email = "" - self.partner._email_bounced_set('test_error', self.event) + self.partner._email_bounced_set('test_error') self.assertEqual(len(self.partner.message_ids), message_number) @mock.patch(_packagepath + '.models.mail_tracking_email.requests')