[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>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user