From 22bd98c502053ef10207ba75eb3cfaa1fc7561ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 30 May 2011 13:38:49 +0200 Subject: [PATCH] Use list of ids for browse instead of set --- product.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/product.py b/product.py index 27a2ad90a0..db21290530 100644 --- a/product.py +++ b/product.py @@ -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)