From 59f0d48e9f906e142d543f6cd2c74ca63f0f33ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Mart=C3=ADnez?= Date: Fri, 17 May 2024 15:08:03 +0200 Subject: [PATCH] [FIX] stock_available_mrp: Fix test value The product company should be taken into account to check the value that we expect --- stock_available_mrp/tests/test_potential_qty.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/stock_available_mrp/tests/test_potential_qty.py b/stock_available_mrp/tests/test_potential_qty.py index fcd8ce7ad..75072e213 100644 --- a/stock_available_mrp/tests/test_potential_qty.py +++ b/stock_available_mrp/tests/test_potential_qty.py @@ -131,7 +131,9 @@ class TestPotentialQty(TransactionCase): company_id=chicago_id, ) self.assertPotentialQty( - self.tmpl, 250.0, "Wrong template potential after receiving components" + self.tmpl.with_company(chicago_id), + 250.0, + "Wrong template potential after receiving components", ) test_user = self.env["res.users"].create( @@ -232,7 +234,9 @@ class TestPotentialQty(TransactionCase): "variant 1's potential", ) self.assertPotentialQty( - self.var2, 213.0, "Wrong variant 2 potential after receiving components" + self.var2.with_company(self.ref("stock.res_company_1")), + 213.0, + "Wrong variant 2 potential after receiving components", ) # Check by warehouse self.assertPotentialQty(