[FIX] stock_available_mrp: Fix test value

The product company should be taken into account to check the value that we expect
This commit is contained in:
Víctor Martínez
2024-05-17 15:08:03 +02:00
parent 9ba27af137
commit 59f0d48e9f

View File

@@ -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(