Commit 69bf1c30 authored by Sebastien Robin's avatar Sebastien Robin

inventory: reuse from_date

parent 533f80f5
...@@ -2063,7 +2063,7 @@ class SimulationTool(BaseTool): ...@@ -2063,7 +2063,7 @@ class SimulationTool(BaseTool):
from_date = DateTime() from_date = DateTime()
current_inventory = self.getInventory(at_date=from_date, **kw) current_inventory = self.getInventory(at_date=from_date, **kw)
if current_inventory < reference_quantity: if current_inventory < reference_quantity:
result = DateTime() result = from_date
else: else:
inventory_list = self.getInventoryList(src__=src__, from_date=from_date, inventory_list = self.getInventoryList(src__=src__, from_date=from_date,
sort_on = (('date', 'ascending'),), group_by_movement=1, **kw) sort_on = (('date', 'ascending'),), group_by_movement=1, **kw)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment