diff --git a/addons/mrp/models/stock_warehouse.py b/addons/mrp/models/stock_warehouse.py index 7496236882b..a03ab6ddc36 100644 --- a/addons/mrp/models/stock_warehouse.py +++ b/addons/mrp/models/stock_warehouse.py @@ -59,9 +59,7 @@ class StockWarehouse(models.Model): @api.model def _get_production_location(self): - location = self.env.ref('stock.location_production', raise_if_not_found=False) - if not location: - location = self.env['stock.location'].search([('usage', '=', 'production')], limit=1) + location = self.env['stock.location'].with_context(force_company=self.company_id.id).search([('usage', '=', 'production'), ('company_id', '=', self.company_id.id)], limit=1) if not location: raise UserError(_('Can\'t find any production location.')) return location diff --git a/addons/mrp/report/report_stock_rule.py b/addons/mrp/report/report_stock_rule.py index d25960d1183..2f25ca6a6bd 100644 --- a/addons/mrp/report/report_stock_rule.py +++ b/addons/mrp/report/report_stock_rule.py @@ -13,5 +13,5 @@ class ReportStockRule(models.AbstractModel): """ res = super(ReportStockRule, self)._get_rule_loc(rule, product_id) if rule.action == 'manufacture': - res['source'] = product_id.property_stock_production or self.env.ref('stock.location_production') + res['source'] = product_id.property_stock_production return res diff --git a/addons/repair/data/repair_demo.xml b/addons/repair/data/repair_demo.xml index 60616df3fb2..173c86f863b 100644 --- a/addons/repair/data/repair_demo.xml +++ b/addons/repair/data/repair_demo.xml @@ -9,7 +9,7 @@ procurement - - Production - - production - - Vendors @@ -97,11 +91,6 @@ - - property_stock_production - - -