diff options
| author | Baptiste Vergote <bve@odoo.com> | 2020-05-18 12:17:17 +0000 |
|---|---|---|
| committer | Baptiste Vergote <bve@odoo.com> | 2020-05-19 16:44:39 +0000 |
| commit | e3be55d3f6d3ee8145e182fd54185115f6699bb6 (patch) | |
| tree | 025f153c9c9dad47ff397e7b11ee53021776d092 | |
| parent | 56b02d54c8c54a6eef7b463ba956c08d55e54b5d (diff) | |
[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>
| -rw-r--r-- | addons/coupon/data/coupon_email_data.xml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/coupon/data/coupon_email_data.xml b/addons/coupon/data/coupon_email_data.xml index 0c399000b35..d28e2f80947 100644 --- a/addons/coupon/data/coupon_email_data.xml +++ b/addons/coupon/data/coupon_email_data.xml @@ -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;"> |
