From e3be55d3f6d3ee8145e182fd54185115f6699bb6 Mon Sep 17 00:00:00 2001 From: Baptiste Vergote Date: Mon, 18 May 2020 12:17:17 +0000 Subject: [PATCH] [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) --- addons/coupon/data/coupon_email_data.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 @@ Your reward coupon from ${object.program_id.company_id.name} ${object.program_id.company_id.email | safe} - ${object.partner_id.id} + ${object.order_id.partner_id.id or object.partner_id.id}