2017-10-17 20:38:11 +02:00
|
|
|
# Copyright 2017 Tecnativa - David Vidal
|
|
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
|
|
|
|
2020-04-02 11:15:00 +02:00
|
|
|
from odoo import fields, models
|
2017-10-17 20:38:11 +02:00
|
|
|
|
|
|
|
|
|
|
|
class MailTrackingEvent(models.Model):
|
|
|
|
_inherit = "mail.tracking.event"
|
|
|
|
|
2020-04-02 11:15:00 +02:00
|
|
|
mailgun_id = fields.Char(string="Mailgun Event ID", copy="False", readonly=True)
|
2017-10-17 20:38:11 +02:00
|
|
|
|
|
|
|
def _process_data(self, tracking_email, metadata, event_type, state):
|
2021-07-22 10:24:42 +02:00
|
|
|
res = super()._process_data(tracking_email, metadata, event_type, state)
|
2020-04-02 11:15:00 +02:00
|
|
|
res.update({"mailgun_id": metadata.get("mailgun_id", False)})
|
2017-10-17 20:38:11 +02:00
|
|
|
return res
|