[FIX] stock: tests and inactive locations
`child_of` used to return inactive records, it doesn't anymore
This commit is contained in:
committed by
Raphael Collet
parent
e724858d50
commit
79d1529c57
@@ -27,8 +27,12 @@ class TestStockCommon(common.TransactionCase):
|
||||
self.picking_type_out = self.ModelDataObj.xmlid_to_res_id('stock.picking_type_out')
|
||||
self.supplier_location = self.ModelDataObj.xmlid_to_res_id('stock.stock_location_suppliers')
|
||||
self.stock_location = self.ModelDataObj.xmlid_to_res_id('stock.stock_location_stock')
|
||||
self.pack_location = self.ModelDataObj.xmlid_to_res_id('stock.location_pack_zone')
|
||||
self.output_location = self.ModelDataObj.xmlid_to_res_id('stock.stock_location_output')
|
||||
pack_location = self.env.ref('stock.location_pack_zone')
|
||||
pack_location.active = True
|
||||
self.pack_location = pack_location.id
|
||||
output_location = self.env.ref('stock.stock_location_output')
|
||||
output_location.active = True
|
||||
self.output_location = output_location.id
|
||||
self.customer_location = self.ModelDataObj.xmlid_to_res_id('stock.stock_location_customers')
|
||||
self.categ_unit = self.ModelDataObj.xmlid_to_res_id('uom.product_uom_categ_unit')
|
||||
self.categ_kgm = self.ModelDataObj.xmlid_to_res_id('uom.product_uom_categ_kgm')
|
||||
|
||||
@@ -12,6 +12,7 @@ class StockMove(TransactionCase):
|
||||
self.customer_location = self.env.ref('stock.stock_location_customers')
|
||||
self.supplier_location = self.env.ref('stock.stock_location_suppliers')
|
||||
self.pack_location = self.env.ref('stock.location_pack_zone')
|
||||
self.pack_location.active = True
|
||||
self.transit_location = self.env['stock.location'].search([
|
||||
('company_id', '=', self.env.user.company_id.id),
|
||||
('usage', '=', 'transit'),
|
||||
|
||||
@@ -525,6 +525,7 @@ class StockQuant(TransactionCase):
|
||||
def test_action_done_1(self):
|
||||
stock_location = self.env.ref('stock.stock_location_stock')
|
||||
pack_location = self.env.ref('stock.location_pack_zone')
|
||||
pack_location.active = True
|
||||
product1 = self.env['product.product'].create({
|
||||
'name': 'Product A',
|
||||
'type': 'product',
|
||||
|
||||
Reference in New Issue
Block a user