mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
[FIX] mrp_multi_level: adapt tests to recent upstream changes.
After 1ed6dbeae5
we need to explicitly set routes in the propoer order becouse while
in the cache there are not yet sorted by sequence (it requires flush
to the database, which we cannot do in a test).
This commit is contained in:
committed by
JasminSForgeFlow
parent
76d18127cb
commit
d84964c095
@@ -444,8 +444,18 @@ class TestMrpMultiLevel(TestMrpMultiLevelCommon):
|
||||
self.fp_4.route_ids = [(4, self.env.ref("mrp.route_warehouse0_manufacture").id)]
|
||||
product_mrp_area._compute_supply_method()
|
||||
self.assertEqual(product_mrp_area.supply_method, "manufacture")
|
||||
# because of the issue discussed here https://github.com/odoo/odoo/pull/188846
|
||||
# we need to apply routes explicitly in the proper order (by sequence)
|
||||
self.fp_4.route_ids = [
|
||||
(4, self.env.ref("purchase_stock.route_warehouse0_buy").id)
|
||||
(
|
||||
6,
|
||||
0,
|
||||
(
|
||||
self.env.ref("stock.route_warehouse0_mto")
|
||||
+ self.env.ref("purchase_stock.route_warehouse0_buy")
|
||||
+ self.env.ref("mrp.route_warehouse0_manufacture")
|
||||
).ids,
|
||||
)
|
||||
]
|
||||
product_mrp_area._compute_supply_method()
|
||||
self.assertEqual(product_mrp_area.supply_method, "buy")
|
||||
|
||||
Reference in New Issue
Block a user