Use local context instead of editing global one
(transplanted from efd54bea6af8b7f6cce82bcdeced7a64c2fb36eb)
This commit is contained in:
1 parent
2472adefc3
commit
dda6b3fe30
1 file changed
+3
-2
+3
-2
@@ -125,10 +125,11 @@ class Inventory(OSV):
|
||||
for inventory in inventories:
|
||||
# Compute product quantities
|
||||
if inventory.date:
|
||||
context['stock_date_end'] = inventory.date
|
||||
ctx = context and context.copy() or {}
|
||||
ctx['stock_date_end'] = inventory.date
|
||||
pbl = product_obj.products_by_location(
|
||||
cursor, user, [inventory.location.id],
|
||||
context=context)
|
||||
context=ctx)
|
||||
else:
|
||||
pbl = product_obj.products_by_location(
|
||||
cursor, user, [inventory.location.id], context=context)
|
||||
|
||||
Reference in new issue
Block a user