[FIX] stock: clean m2m records for warehouses on routes.
when we select places warehouses where route can be applied, then unselect that warehouses, warehouses values on m2m tag are not deleted. because of wrong value empty list on onchange. so remove all records of warehouses if warehouse option was not selected. closes odoo/odoo#33883 Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
This commit is contained in:
@@ -173,7 +173,7 @@ class Route(models.Model):
|
||||
@api.onchange('warehouse_selectable')
|
||||
def _onchange_warehouse_selectable(self):
|
||||
if not self.warehouse_selectable:
|
||||
self.warehouse_ids = []
|
||||
self.warehouse_ids = [(5, 0, 0)]
|
||||
|
||||
def write(self, values):
|
||||
'''when a route is deactivated, deactivate also its pull and push rules'''
|
||||
|
||||
Reference in New Issue
Block a user