Do not browse repeated products
If there are repeated product ids in the browse list, the loop gets too slow. issue8756 review274121002
This commit is contained in:
1 parent
78bcc4cdc0
commit
127f24dc39
1 file changed
+1
-1
+1
-1
@@ -246,7 +246,7 @@ class Inventory(Workflow, ModelSQL, ModelView):
|
||||
# Index some data
|
||||
product2type = {}
|
||||
product2consumable = {}
|
||||
for product in Product.browse([line[1] for line in pbl]):
|
||||
for product in Product.browse({line[1] for line in pbl}):
|
||||
product2type[product.id] = product.type
|
||||
product2consumable[product.id] = product.consumable
|
||||
|
||||
|
||||
Reference in new issue
Block a user