diff --git a/addons/stock/tests/common.py b/addons/stock/tests/common.py index ea8434c7f6e..31a7f78df1d 100644 --- a/addons/stock/tests/common.py +++ b/addons/stock/tests/common.py @@ -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') diff --git a/addons/stock/tests/test_move.py b/addons/stock/tests/test_move.py index 3e20a6ee588..8e7eba5e5f7 100644 --- a/addons/stock/tests/test_move.py +++ b/addons/stock/tests/test_move.py @@ -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'), diff --git a/addons/stock/tests/test_quant.py b/addons/stock/tests/test_quant.py index 9a8dc37ee51..baebfc1de9d 100644 --- a/addons/stock/tests/test_quant.py +++ b/addons/stock/tests/test_quant.py @@ -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',