summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSwapnesh Shah <swapneshshah111@gmail.com>2020-01-26 15:35:18 +0000
committerThibault Delavallée <tde@odoo.com>2020-03-25 15:01:22 +0000
commita2e5514b8a720b531b2b853d49ae88c07c12f7e2 (patch)
treeec55f1bf04a22973f437a7e812a672e50d2ba236
parent95f30739a88a5b4d76444ff42047266a1aa0e8e7 (diff)
[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>
-rw-r--r--addons/product_email_template/models/account_move.py6
1 files 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