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",
|
'name': "Subcontract Productions",
|
||||||
'version': '12.0.1.0.3',
|
'version': '12.0.1.0.4',
|
||||||
"author": "Odoo S.A., Tecnativa, Odoo Community Association (OCA)",
|
"author": "Odoo S.A., Tecnativa, Odoo Community Association (OCA)",
|
||||||
'website': 'https://github.com/OCA/manufacture',
|
'website': 'https://github.com/OCA/manufacture',
|
||||||
'category': 'Manufacturing Orders & BOMs',
|
'category': 'Manufacturing Orders & BOMs',
|
||||||
|
|||||||
@@ -210,8 +210,11 @@ class TestSubcontractingFlows(TestMrpSubcontractingCommon):
|
|||||||
# Tick "manufacture" and MTO on self.comp2
|
# Tick "manufacture" and MTO on self.comp2
|
||||||
mto_route = self.env.ref('stock.route_warehouse0_mto')
|
mto_route = self.env.ref('stock.route_warehouse0_mto')
|
||||||
manufacture_route = self.env.ref('mrp.route_warehouse0_manufacture')
|
manufacture_route = self.env.ref('mrp.route_warehouse0_manufacture')
|
||||||
self.comp2.write({'route_ids': [(4, manufacture_route.id, None)]})
|
self.comp2.write({'route_ids': [
|
||||||
self.comp2.write({'route_ids': [(4, mto_route.id, None)]})
|
(5, False),
|
||||||
|
(4, manufacture_route.id, None),
|
||||||
|
(4, mto_route.id, None),
|
||||||
|
]})
|
||||||
# Create a receipt picking from the subcontractor
|
# Create a receipt picking from the subcontractor
|
||||||
picking_form = Form(self.env['stock.picking'])
|
picking_form = Form(self.env['stock.picking'])
|
||||||
picking_form.picking_type_id = self.env.ref('stock.picking_type_in')
|
picking_form.picking_type_id = self.env.ref('stock.picking_type_in')
|
||||||
|
|||||||
Reference in New Issue
Block a user