[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
This commit is contained in:
Nicolas Martinelli
2017-06-30 14:17:44 +02:00
parent a5bf3016bb
commit bb5d999596
+2 -1
View File
@@ -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