diff options
| author | Christophe Simonis <chs@odoo.com> | 2018-04-16 19:56:43 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2018-04-16 19:56:43 +0200 |
| commit | 8801177bf172d42eb37bfb67c7d1421697bd4f03 (patch) | |
| tree | 0f45234f79c7693e5274e9bd7a779cb932039fcc /tests/test_program_numbers.py | |
| parent | 7b5b3ea96daee84d29098cf9c1905a5df1a57258 (diff) | |
| parent | f1b8b48844062032defd3a4465a41c73938380e9 (diff) | |
[MERGE] forward port branch saas-11.2 up to dd571e88f7c
Diffstat (limited to 'tests/test_program_numbers.py')
| -rw-r--r-- | tests/test_program_numbers.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test_program_numbers.py b/tests/test_program_numbers.py index fcb5002d5c0..9a698f3cf9b 100644 --- a/tests/test_program_numbers.py +++ b/tests/test_program_numbers.py @@ -178,3 +178,11 @@ class TestSaleCouponProgramNumbers(TestSaleCouponCommon): order.recompute_coupon_lines() # (10x25) + (320 +15% tax) - (20% of (320 + 15% tax) = 250 + 368 - 73.6 = 544.4 self.assertEqual(order.amount_total, 544.4, "We should only get reduction on ipad") + sol1.product_uom_qty = 10 + order.recompute_coupon_lines() + # (10x25) + (10x (320 +15% tax)) - (20% of (10x (320 + 15% tax))) - 2 free iPads = 250 + 3680 - 736 - 736 = 2458 + self.assertEqual(order.amount_total, 2458, "Changing ipad quantity should change discount amount correctly") + + p_specific_product.discount_max_amount = 200 + order.recompute_coupon_lines() + self.assertEqual(order.amount_total, 2994, "The discount should be limited to $200") |
