summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJorge Pinna Puissant <jpp@odoo.com>2019-06-26 09:34:25 +0000
committerJorge Pinna Puissant <jpp@odoo.com>2019-06-27 08:15:51 +0000
commit7f57d3c5f21ff1fc88a07a5f68f7d2a2b6f7005e (patch)
tree77a343b42763cff9d77d61c491bc42d88e7036fb
parentead2d19e4a9cb25e1953e8528face4090079ae1d (diff)
[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) <len@odoo.com>
-rw-r--r--addons/mail/models/mail_template.py1
1 files changed, 1 insertions, 0 deletions
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)