[FIX] sale_coupon: send mail template to partner of SO
... instead of public user Once sending the template email Coupon: Send by Email. Odoo was sending to the partner linked to the sale.coupon However in the case of the program having the parameters: apply on next order & apply automatically. The partner_id.id is the public user. This commit is modifying the value of the template to send the email to the partner of the SO instead of the partner of the current coupon. opw-2255674 closes odoo/odoo#51570 X-original-commit: f7e0c2d1568b222d510d3a10fba1116fabfff604 Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
<field name="model_id" ref="coupon.model_coupon_coupon"/>
|
||||
<field name="subject">Your reward coupon from ${object.program_id.company_id.name} </field>
|
||||
<field name="email_from">${object.program_id.company_id.email | safe}</field>
|
||||
<field name="partner_to">${object.partner_id.id}</field>
|
||||
<field name="partner_to">${object.order_id.partner_id.id or object.partner_id.id}</field>
|
||||
<field name="body_html" type="html">
|
||||
<table border="0" cellpadding="0" cellspacing="0" style="width:100%; margin:0px auto;"><tbody>
|
||||
<tr><td valign="top" style="text-align: center; font-size: 14px;">
|
||||
|
||||
Reference in New Issue
Block a user