diff options
| author | Christophe Simonis <chs@odoo.com> | 2017-06-27 13:45:01 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2017-06-27 13:45:01 +0200 |
| commit | 4889fdb1352a2a2f830fff3039661d6fc8509c26 (patch) | |
| tree | b72cffc73f31f5afd2608a1da111f41b3df003aa /tests/test_program_with_code_operations.py | |
| parent | 3832ad55822d183b74d376b09d4749b8c476dd63 (diff) | |
| parent | 4a1cf10843014225d410c9fe6328497cb340ba5c (diff) | |
[MERGE] forward port branch saas-15 up to 6492adc3c4c
Diffstat (limited to 'tests/test_program_with_code_operations.py')
| -rw-r--r-- | tests/test_program_with_code_operations.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/test_program_with_code_operations.py b/tests/test_program_with_code_operations.py index b39e02b98c7..50457f5c14c 100644 --- a/tests/test_program_with_code_operations.py +++ b/tests/test_program_with_code_operations.py @@ -42,10 +42,12 @@ class TestProgramWithCodeOperations(TestSaleCouponCommon): self.env['sale.coupon.apply.code'].with_context(active_id=order.id).create({ 'coupon_code': self.code_promotion_program.coupon_ids.code }).process_coupon() + order.recompute_coupon_lines() self.assertEqual(len(order.order_line.ids), 2) # Remove the product A from the sale order order.write({'order_line': [(2, order.order_line[0].id, False)]}) + order.recompute_coupon_lines() self.assertEqual(len(order.order_line.ids), 0) def test_on_next_order_reward_promo_program(self): @@ -71,6 +73,7 @@ def test_on_next_order_reward_promo_program(self): 'coupon_code': 'bleurk' }).process_coupon() # Ensure that the coupon is correctly generated + order.recompute_coupon_lines() self.assertEqual(len(self.immediate_promotion_program.coupon_ids.ids), 1) generated_coupon = self.immediate_promotion_program.coupon_ids[0] @@ -89,4 +92,5 @@ def test_on_next_order_reward_promo_program(self): 'coupon_code': generated_coupon.code }) # Ensure that the generated coupon is valid + order.recompute_coupon_lines() self.assertEqual(len(order.order_line.ids), 2) |
