From e0791949d895e19049c199693e1139764fe2358a Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Mon, 28 Dec 2020 18:08:47 +0100 Subject: [PATCH] [FIX] mrp_subcontracting: Make test resilient to purchase co-existence (2) Followup of 17be0f7. There is other test with the same "setup". Fixes #581 --- mrp_subcontracting/tests/test_subcontracting.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mrp_subcontracting/tests/test_subcontracting.py b/mrp_subcontracting/tests/test_subcontracting.py index f00c77699..aa48545fc 100644 --- a/mrp_subcontracting/tests/test_subcontracting.py +++ b/mrp_subcontracting/tests/test_subcontracting.py @@ -275,8 +275,11 @@ class TestSubcontractingFlows(TestMrpSubcontractingCommon): # Tick "manufacture" and MTO on self.comp2 mto_route = self.env.ref('stock.route_warehouse0_mto') manufacture_route = self.env.ref('mrp.route_warehouse0_manufacture') - self.comp2.write({'route_ids': [(4, manufacture_route.id, None)]}) - self.comp2.write({'route_ids': [(4, mto_route.id, None)]}) + self.comp2.write({'route_ids': [ + (5, False), + (4, manufacture_route.id, None), + (4, mto_route.id, None), + ]}) orderpoint_form = Form(self.env['stock.warehouse.orderpoint']) orderpoint_form.product_id = self.comp2 orderpoint_form.product_min_qty = 0.0