Use list of ids for browse instead of set

This commit is contained in:
Cédric Krier committed 2011-05-30 13:38:49 +02:00
1 parent 51e3e3f6c2
commit 22bd98c502
1 file changed
+2 -1
+2 -1
View File
@@ -184,10 +184,11 @@ class Product(ModelSQL, ModelView):
# Skip warehouse location in favor of their storage location
# to compute quantities. Keep track of which ids to remove
# and to add after the query.
locations = location_obj.browse(location_ids)
location_ids = set(location_ids)
storage_to_remove = set()
wh_to_add = {}
for location in location_obj.browse(location_ids):
for location in locations:
if (location.type == 'warehouse'
and Transaction().context.get('stock_skip_warehouse')):
location_ids.remove(location.id)