You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
646 B

  1. # -*- coding: utf-8 -*-
  2. # Copyright 2017 Tecnativa - David Vidal
  3. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
  4. from openerp import models, fields
  5. class MailTrackingEvent(models.Model):
  6. _inherit = "mail.tracking.event"
  7. mailgun_id = fields.Char(
  8. string="Mailgun Event ID",
  9. copy="False",
  10. readonly=True,
  11. )
  12. def _process_data(self, tracking_email, metadata, event_type, state):
  13. res = super(MailTrackingEvent, self)._process_data(
  14. tracking_email, metadata, event_type, state)
  15. res.update({'mailgun_id': metadata.get('mailgun_id', False)})
  16. return res