|
@ -3,7 +3,7 @@ |
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
|
|
|
|
|
|
|
|
import json |
|
|
import json |
|
|
from openerp import models |
|
|
|
|
|
|
|
|
from odoo import models |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class IrMailServer(models.Model): |
|
|
class IrMailServer(models.Model): |
|
@ -14,9 +14,7 @@ class IrMailServer(models.Model): |
|
|
tracking_email_id, headers) |
|
|
tracking_email_id, headers) |
|
|
headers = headers or {} |
|
|
headers = headers or {} |
|
|
metadata = { |
|
|
metadata = { |
|
|
# NOTE: We can not use 'self.env.cr.dbname' because self is |
|
|
|
|
|
# ir.mail_server object in old API (osv.osv) |
|
|
|
|
|
'odoo_db': self.pool.db_name, |
|
|
|
|
|
|
|
|
'odoo_db': self.env.cr.dbname, |
|
|
'tracking_email_id': tracking_email_id, |
|
|
'tracking_email_id': tracking_email_id, |
|
|
} |
|
|
} |
|
|
headers['X-Mailgun-Variables'] = json.dumps(metadata) |
|
|
headers['X-Mailgun-Variables'] = json.dumps(metadata) |
|
|