Commit e14d81c3 authored by Cédric Le Ninivin's avatar Cédric Le Ninivin Committed by Cédric Le Ninivin

builder: Supply builder Fix calculation of initial stock

parent b3510881
...@@ -451,15 +451,14 @@ class BuilderMixin(XMLObject, Amount, Predicate): ...@@ -451,15 +451,14 @@ class BuilderMixin(XMLObject, Amount, Predicate):
return [] return []
from_date = date from_date = date
# Prepare period_list
limit_date = getPreviousValidDate(getPreviousValidDate(from_date) - 0.1)
# evaluate future inventory at date # evaluate future inventory at date
future_inventory_to_date = portal.portal_simulation.getFutureInventory( future_inventory_to_date = portal.portal_simulation.getFutureInventory(
to_date=from_date, to_date=limit_date,
resource_uid=resource_value.getUid(), resource_uid=resource_value.getUid(),
node_uid=supply.getDestinationUid(), node_uid=supply.getDestinationUid(),
) )
# Prepare period_list
limit_date = getPreviousValidDate(getPreviousValidDate(from_date) - 0.1)
limit_date_list = [] limit_date_list = []
last_date = getPreviousValidDate(history_list[-1][0]) last_date = getPreviousValidDate(history_list[-1][0])
while limit_date <= last_date: while limit_date <= last_date:
......
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