From 1ab006ffcbb91afce2e8741d8c88083b2e947c79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20De=20Caluw=C3=A9?= Date: Wed, 2 Nov 2022 07:38:56 +0000 Subject: [PATCH] [FIX] purchase_stock: ignore tax calculations in tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The tests in the purchase_stock module include some tests that make sure or depend on the fact that the price_unit from the generated move lines equals the price_unit from the purchase order line from which they were created. However, the price_unit in the move lines exclude taxes (at least those that have an account set, it uses the total_void computed from the purchase order line). This means some tests will fail if an installed localization defines taxes that are included in the price. The problem is resolved by explicitly creating the test product used in those tests without supplier taxes. opw-3033340 closes odoo/odoo#104825 X-original-commit: 70f7e2d70d04df989d3ff8039d3bae7ebdb73a6b Signed-off-by: Adrien Widart Signed-off-by: De Caluwé Tom (tdc) --- addons/purchase_stock/tests/test_stockvaluation.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/purchase_stock/tests/test_stockvaluation.py b/addons/purchase_stock/tests/test_stockvaluation.py index 630e8cc3768..a1a5ffeab4f 100644 --- a/addons/purchase_stock/tests/test_stockvaluation.py +++ b/addons/purchase_stock/tests/test_stockvaluation.py @@ -27,6 +27,8 @@ class TestStockValuation(TransactionCase): 'name': 'Large Desk', 'standard_price': 1299.0, 'list_price': 1799.0, + # Ignore tax calculations for these tests. + 'supplier_taxes_id': False, 'type': 'product', }) Account = cls.env['account.account']