Iterate over a copy of keys in products_by_location
As the quantities dictionary may change during the iteration, we must loop over a copy of the keys. issue8978 review260771002
This commit is contained in:
1 parent
1790483208
commit
3242d3258c
1 file changed
+1
-1
+1
-1
@@ -203,7 +203,7 @@ class Product(StockMixin, object, metaclass=PoolMeta):
|
||||
|
||||
if wh_to_add:
|
||||
for wh, storage in wh_to_add.items():
|
||||
for key in quantities:
|
||||
for key in list(quantities.keys()):
|
||||
if key[0] == storage:
|
||||
quantities[(wh,) + key[1:]] = quantities[key]
|
||||
if storage in storage_to_remove:
|
||||
|
||||
Reference in new issue
Block a user