mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
[FIX] mrp_subcontracting: Make test resilient to purchase co-existence
If `purchase` module is installed, "Buy" route is set by default on new products, so this collapses with the test definition that intends to use "Manufacture" one. Fixes #581
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
|
||||
{
|
||||
'name': "Subcontract Productions",
|
||||
'version': '12.0.1.0.3',
|
||||
'version': '12.0.1.0.4',
|
||||
"author": "Odoo S.A., Tecnativa, Odoo Community Association (OCA)",
|
||||
'website': 'https://github.com/OCA/manufacture',
|
||||
'category': 'Manufacturing Orders & BOMs',
|
||||
|
||||
@@ -210,8 +210,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),
|
||||
]})
|
||||
# Create a receipt picking from the subcontractor
|
||||
picking_form = Form(self.env['stock.picking'])
|
||||
picking_form.picking_type_id = self.env.ref('stock.picking_type_in')
|
||||
|
||||
Reference in New Issue
Block a user