Code review comment for lp:~numerigraphe-team/stock-logistic-warehouse/7.0-inventory-location

Revision history for this message
Lionel Sausin - Initiatives/Numérigraphe (ls-initiatives) wrote :

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,

« Back to merge proposal