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 odoo/odoo#48106

X-original-commit: 9c41e8bafdcb5e36570f10696d8e806ef7bd6a18
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
  • Loading branch information
sswapnesh authored and tde-banana-odoo committed Mar 25, 2020
1 parent e41e64b commit 077f580
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions addons/product_email_template/models/account_move.py
Original file line number Diff line number Diff line change
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 077f580

Please sign in to comment.