Commit d0ae8ccf authored by Xiaowu Zhang's avatar Xiaowu Zhang

erp5_base: check stock for multi destinations

parent 0b7a086b
......@@ -509,7 +509,7 @@ class BuilderMixin(XMLObject, Amount, Predicate):
# Prepare history list to work with
history_list = resource_value.Resource_getInventoryHistoryList(
from_date=from_date,
node_uid=supply.getDestinationUid()
node_uid=supply.getDestinationUidList()
# XXX This should be bound to a stard and stop date
)
#self.log("history_list len: %s" % len(history_list))
......@@ -542,14 +542,14 @@ class BuilderMixin(XMLObject, Amount, Predicate):
future_inventory_to_date = portal.portal_simulation.getFutureInventory(
to_date=limit_date_list[0],
resource_uid=resource_value.getUid(),
node_uid=supply.getDestinationUid(),
node_uid=supply.getDestinationUidList(),
)
# We update history_list to include movements from the initial inventory date
history_list = resource_value.Resource_getInventoryHistoryList(
from_date=limit_date_list[0],
to_date=history_list[0][0],
node_uid=supply.getDestinationUid()
node_uid=supply.getDestinationUidList()
) + history_list
next_period_history_list = []
......
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