From bb5d999596cc4b773b33311d318fe6aa9fd317e6 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Fri, 30 Jun 2017 14:17:44 +0200 Subject: [PATCH] [FIX] sale_coupon: default invoicing policy The default invoicing policy should always be by ordered quantity. Otherwise, if the user changes the default invoicing policy to "delivered quantity", coupon won't be applied to the invoice. opw-749632 --- models/sale_coupon_program.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/models/sale_coupon_program.py b/models/sale_coupon_program.py index 5341ad82898..cdf178aad50 100644 --- a/models/sale_coupon_program.py +++ b/models/sale_coupon_program.py @@ -80,7 +80,8 @@ class SaleCouponProgram(models.Model): 'taxes_id': False, 'supplier_taxes_id': False, 'sale_ok': False, - 'purchase_ok': False + 'purchase_ok': False, + 'invoice_policy': 'order', }) program.write({'discount_line_product_id': discount_line_product_id.id}) return program