diff options
| author | Nicolas Martinelli <nim@odoo.com> | 2017-09-08 13:14:36 +0200 |
|---|---|---|
| committer | Nicolas Martinelli <nim@odoo.com> | 2017-09-08 13:14:36 +0200 |
| commit | cbee332bb129bf7e47ef5fbbf5ee898d963b57cd (patch) | |
| tree | a1486419768d44e44d9e10ab2438db89b69d9902 /addons | |
| parent | 825c7c1ed667bcab0298d8276e637c0861edbd1a (diff) | |
[FIX] mrp_repair: default location in multi-company
1. Create a new company
2. Create a user with access to this company and with access to repair
3. Connect as the new user
4. Try to create a new repair and the stock.warehouse access error
should appear
opw-769160
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/mrp_repair/models/mrp_repair.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/mrp_repair/models/mrp_repair.py b/addons/mrp_repair/models/mrp_repair.py index 7419acb83b7..0d0044ce3f2 100644 --- a/addons/mrp_repair/models/mrp_repair.py +++ b/addons/mrp_repair/models/mrp_repair.py @@ -15,7 +15,7 @@ class Repair(models.Model): @api.model def _default_stock_location(self): - warehouse = self.env.ref('stock.warehouse0', raise_if_not_found=False) + warehouse = self.env['stock.warehouse'].search([], limit=1) if warehouse: return warehouse.lot_stock_id.id return False |
