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.

20 lines
619 B

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