Fixed Deprecated Warning

This commit is contained in:
EAJGlobal 2022-08-23 16:05:03 +00:00 committed by GitHub
parent 23ec60a8cf
commit 836c7d0981
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,7 +13,7 @@ class IrMailServer(models.Model):
def _tracking_headers_add(self, tracking_email_id, headers):
"""Allow other addons to add its own tracking SMTP headers"""
headers = headers or {}
headers["X-Odoo-Database"] = getattr(threading.currentThread(), "dbname", None)
headers["X-Odoo-Database"] = getattr(threading.current_thread(), "dbname", None)
headers["X-Odoo-MailTracking-ID"] = tracking_email_id
return headers