[IMP] stock_mts_mto_rule: Make tests resilient

Using an already created product can lead to incorrect tests on integrated
environments where other modules modify this product. We create a new one for
avoiding this side effect.
This commit is contained in:
Pedro M. Baeza
2020-02-20 08:34:14 +01:00
committed by Pierrick Brun
parent 9e51002a43
commit 69383a1b7e

View File

@@ -149,7 +149,10 @@ class TestMtoMtsRoute(TransactionCase):
self.uom = self.env['uom.uom'].browse(1)
self.warehouse.mto_mts_management = True
self.customer_loc = self.env.ref('stock.stock_location_customers')
self.product = self.env.ref('product.product_product_4')
self.product = self.env['product.product'].create({
'name': 'Test product',
'type': 'product',
})
self.company_partner = self.env.ref('base.main_partner')
self.group = self.env['procurement.group'].create({
'name': 'test',