laetitia-gangloff,
Can you please explain this change in your branch? I don't see the point because ids is already sure to be Iterable. Does it really have to be a list?
@@ -285,11 +285,11 @@
def write(self, cr, uid, ids, vals, context=None):
"""Refuse write if an inventory is being conducted""" self._check_inventory(cr, uid, ids, context=context)
if not isinstance(ids, Iterable):
ids = [ids]
- ids_to_check = list(ids)
+ ids_to_check = ids
# If changing the parent, no inventory must conducted there either
if vals.get('location_id'): ids_to_check.append(vals['location_id']) self._check_inventory(cr, uid, ids_to_check, context=context)
return super(StockLocation, self).write(cr, uid, ids, vals,
laetitia-gangloff,
Can you please explain this change in your branch? I don't see the point because ids is already sure to be Iterable. Does it really have to be a list?
@@ -285,11 +285,11 @@
self. _check_ inventory( cr, uid, ids, context=context) 'location_ id'):
ids_ to_check. append( vals['location_ id'])
self. _check_ inventory( cr, uid, ids_to_check, context=context) tion, self).write(cr, uid, ids, vals,
def write(self, cr, uid, ids, vals, context=None):
"""Refuse write if an inventory is being conducted"""
if not isinstance(ids, Iterable):
ids = [ids]
- ids_to_check = list(ids)
+ ids_to_check = ids
# If changing the parent, no inventory must conducted there either
if vals.get(
return super(StockLoca