From a2e5514b8a720b531b2b853d49ae88c07c12f7e2 Mon Sep 17 00:00:00 2001 From: Swapnesh Shah Date: Sun, 26 Jan 2020 15:35:18 +0000 Subject: [PATCH] [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) --- addons/product_email_template/models/account_move.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/addons/product_email_template/models/account_move.py b/addons/product_email_template/models/account_move.py index f663df4d333..7fd6ad2f7db 100644 --- a/addons/product_email_template/models/account_move.py +++ b/addons/product_email_template/models/account_move.py @@ -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