diff options
| author | Christophe Simonis <chs@odoo.com> | 2018-04-17 16:24:44 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2018-04-17 16:24:44 +0200 |
| commit | 417e15ff39589d3db33dbc145d0535b48afa3a38 (patch) | |
| tree | ef13ea38e99aa75c4116c9777c673e6ccdc846b2 /tests/test_program_numbers.py | |
| parent | 96cc6c38755a0d6927f566fe83ce8aeffa0ea91b (diff) | |
| parent | 8801177bf172d42eb37bfb67c7d1421697bd4f03 (diff) | |
[MERGE] forward port branch saas-11.3 up to 7636a83eb68
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") |
