summaryrefslogtreecommitdiff
path: root/tests/test_program_with_code_operations.py
diff options
context:
space:
mode:
authorRomain Derie <rde@odoo.com>2018-03-28 18:00:48 +0200
committerRomain Derie <rde@odoo.com>2018-03-29 13:14:06 +0200
commit0a565abfad5b9d6fc2d67ce10a54b3212c98726a (patch)
tree27f9d1d74ec15548e052ec64a848ad0328f15004 /tests/test_program_with_code_operations.py
parent61d049ab4c1d425d0d7df25d96ee0f0e7a0bbd99 (diff)
[FIX] sale_coupon(_delivery): correct discount when specific product
Before this commit: 1. With a coupon set on 'specific_product', the discount amount was multiplied by the product quantity twice. (Introduced by a42c27f which apply discount on the full price by using price_total (already multiplied by quantity) over price_unit. 2. With a coupon set on 'cheapest_product', the discount was not discounting taxes. 3. With a coupon set on 'cheapest_product' and `sale_coupon_delivery` installed, it would simply crashes and throws an error since `sale.order.line` has no `program_id` attribute. Now: 1. We no longer multiply by the quantity twice; 2. We apply discount on the full price (with taxes); 3. We use correct attribute to avoid crash. opw-1830986
Diffstat (limited to 'tests/test_program_with_code_operations.py')
0 files changed, 0 insertions, 0 deletions