mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
[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:
committed by
Pierrick Brun
parent
9e51002a43
commit
69383a1b7e
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user