summaryrefslogtreecommitdiff
path: root/addons/web/static/tests/fields/relational_fields_tests.js
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
commit4e81ca7814a9ac6a8eef7e8a1a491ef3b4668557 (patch)
treefd4a5a749a024ae61fbf9e73b282c8c80a1aee61 /addons/web/static/tests/fields/relational_fields_tests.js
parentbc75ec7c1426866550ef26b8fd53294962f5ffd7 (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 'addons/web/static/tests/fields/relational_fields_tests.js')
0 files changed, 0 insertions, 0 deletions