Use inventory company to complete lines

Closes #12127
This commit is contained in:
Sergi Almacellas Abellana
2023-03-09 13:37:12 +01:00
parent 641cb7c9a4
commit bf6fb5b760
+3 -1
View File
@@ -256,7 +256,9 @@ class Inventory(Workflow, ModelSQL, ModelView):
if inventory.state == 'done':
continue
# Compute product quantities
with Transaction().set_context(stock_date_end=inventory.date):
with Transaction().set_context(
company=inventory.company.id,
stock_date_end=inventory.date):
if fill:
pbl = Product.products_by_location(
[inventory.location.id],