Skip to content

Commit

Permalink
[FIX] product_email_template: use correct parameter for notification …
Browse files Browse the repository at this point in the history
…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 #48357

X-original-commit: 077f580
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
  • Loading branch information
sswapnesh authored and tde-banana-odoo committed Mar 25, 2020
1 parent 6c6bd01 commit 427666c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions addons/product_email_template/models/account_move.py
Expand Up @@ -14,8 +14,10 @@ def invoice_validate_send_email(self):
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

Expand Down

0 comments on commit 427666c

Please sign in to comment.