From 378b161ee12bd751768c99722f88eb4d545f5918 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Thu, 22 Jun 2017 12:18:53 +0200 Subject: [PATCH] [FIX] point_of_sale: make tests consistent wrt taxes (take 2) Rev 7b494187e99f90359167bb02743bc2f4f5f81043 forgot to correct some tests. --- addons/point_of_sale/tests/test_point_of_sale_flow.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/addons/point_of_sale/tests/test_point_of_sale_flow.py b/addons/point_of_sale/tests/test_point_of_sale_flow.py index d37a19c890e..c4739f418f7 100644 --- a/addons/point_of_sale/tests/test_point_of_sale_flow.py +++ b/addons/point_of_sale/tests/test_point_of_sale_flow.py @@ -153,7 +153,6 @@ class TestPointOfSaleFlow(TestPointOfSaleCommon): })] }) - # I click on the "Make Payment" wizard to pay the PoS order with the total amount (2*450 + 3*300 = 1800) context_make_payment = { "active_ids": [self.pos_order_pos1.id], "active_id": self.pos_order_pos1.id @@ -217,7 +216,6 @@ class TestPointOfSaleFlow(TestPointOfSaleCommon): })] }) - # I click on the "Make Payment" wizard to pay the PoS order with the total amount (-2*450 + -3*300 = -1800) context_make_payment = { "active_ids": [self.pos_order_pos2.id], "active_id": self.pos_order_pos2.id @@ -270,22 +268,23 @@ class TestPointOfSaleFlow(TestPointOfSaleCommon): 'price_unit': 450, 'discount': 0.0, 'qty': (-2.0), + 'tax_ids': [(6, 0, self.product3.taxes_id.ids)], }), (0, 0, { 'name': "OL/0006", 'product_id': self.product4.id, 'price_unit': 300, 'discount': 0.0, 'qty': 3.0, + 'tax_ids': [(6, 0, self.product4.taxes_id.ids)], })] }) - # I click on the "Make Payment" wizard to pay the PoS order with the total amount (-2*450 + 3*300 = 0) context_make_payment = { "active_ids": [self.pos_order_pos3.id], "active_id": self.pos_order_pos3.id } self.pos_make_payment_4 = self.PosMakePayment.with_context(context_make_payment).create({ - 'amount': 0 + 'amount': 45, }) # I click on the validate button to register the payment.