diff options
| author | Simon Lejeune <sle@openerp.com> | 2019-03-06 08:38:38 +0000 |
|---|---|---|
| committer | Simon Lejeune <sle@openerp.com> | 2019-03-06 08:38:38 +0000 |
| commit | dfb5e3791f21b911f0d738caa4bb75eee4664bc5 (patch) | |
| tree | 7b46e00ce032b778ce3ee289a939bba4fdd42307 | |
| parent | e74f96ba0682fb582ca22e2032eb927489714275 (diff) | |
[FIX] stock: duplicate route
Do not apply the duplicated route to the products/categories/warehouses
the original one was applied to.
Fixes #31610
closes odoo/odoo#31619
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
| -rw-r--r-- | addons/stock/models/stock_location.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/addons/stock/models/stock_location.py b/addons/stock/models/stock_location.py index 3c95d6695d1..8bca32379d3 100644 --- a/addons/stock/models/stock_location.py +++ b/addons/stock/models/stock_location.py @@ -162,9 +162,9 @@ class Route(models.Model): 'res.company', 'Company', default=lambda self: self.env['res.company']._company_default_get('stock.location.route'), index=True, help='Leave this field empty if this route is shared between all companies') - product_ids = fields.Many2many('product.template', 'stock_route_product', 'route_id', 'product_id', 'Products') - categ_ids = fields.Many2many('product.category', 'stock_location_route_categ', 'route_id', 'categ_id', 'Product Categories') - warehouse_ids = fields.Many2many('stock.warehouse', 'stock_route_warehouse', 'route_id', 'warehouse_id', 'Warehouses') + product_ids = fields.Many2many('product.template', 'stock_route_product', 'route_id', 'product_id', 'Products', copy=False) + categ_ids = fields.Many2many('product.category', 'stock_location_route_categ', 'route_id', 'categ_id', 'Product Categories', copy=False) + warehouse_ids = fields.Many2many('stock.warehouse', 'stock_route_warehouse', 'route_id', 'warehouse_id', 'Warehouses', copy=False) @api.onchange('warehouse_selectable') def _onchange_warehouse_selectable(self): |
