[FIX] product_email_template: use correct parameter for notification layout

Message post with template has to be called with a notif_layout parameter in
order to have a layouting correctly set through the call chain.

closes odoo/odoo#48359

X-original-commit: 077f58027e29a50cd9a9bf455b5ca5c482503686
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit is contained in:
Swapnesh Shah
2020-03-25 15:01:22 +00:00
committed by Thibault Delavallée
parent 95f30739a8
commit a2e5514b8a
@@ -14,8 +14,10 @@ class AccountMove(models.Model):
invoice.message_subscribe([invoice.partner_id.id])
for line in invoice.invoice_line_ids:
if line.product_id.email_template_id:
invoice.with_context(custom_layout="mail.mail_notification_light").message_post_with_template(
line.product_id.email_template_id.id, composition_mode="comment"
invoice.message_post_with_template(
line.product_id.email_template_id.id,
composition_mode="comment",
email_layout_xmlid="mail.mail_notification_light"
)
return True