diff options
| author | Christophe Simonis <chs@odoo.com> | 2017-06-27 12:11:13 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2017-06-27 12:11:13 +0200 |
| commit | 4a1cf10843014225d410c9fe6328497cb340ba5c (patch) | |
| tree | 824dbc3d0c90e721e45b4fa5726970a2aa665189 /tests/test_program_with_code_operations.py | |
| parent | ae3a42963f2ac0cba76b996b4de9fbfdf33223a4 (diff) | |
| parent | a5bf3016bb8bfa58e12c3ceb3d693f838efaf13e (diff) | |
[MERGE] forward port branch saas-14 up to 23d93a69581
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) |
