From 7f57d3c5f21ff1fc88a07a5f68f7d2a2b6f7005e Mon Sep 17 00:00:00 2001 From: Jorge Pinna Puissant Date: Wed, 26 Jun 2019 09:34:25 +0000 Subject: [PATCH] [FIX] mail: allow more complex email layout Add record to the email values to allow the use of more complex email layout as : "mail.mail_notification_paynow" opw-2025099 closes odoo/odoo#34375 Signed-off-by: Nans Lefebvre (len) --- addons/mail/models/mail_template.py | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/mail/models/mail_template.py b/addons/mail/models/mail_template.py index 044c175870c..6a306cf4e8b 100644 --- a/addons/mail/models/mail_template.py +++ b/addons/mail/models/mail_template.py @@ -535,6 +535,7 @@ class MailTemplate(models.Model): 'message': self.env['mail.message'].sudo().new(dict(body=values['body_html'], record_name=record.display_name)), 'model_description': self.env['ir.model']._get(record._name).display_name, 'company': 'company_id' in record and record['company_id'] or self.env.user.company_id, + 'record': record, } body = template.render(template_ctx, engine='ir.qweb', minimal_qcontext=True) values['body_html'] = self.env['mail.thread']._replace_local_links(body)