Commit b9accd5c authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

Builder: Supply builder fix min stock to check only if movement are commings

parent 75c34345
...@@ -444,6 +444,7 @@ class BuilderMixin(XMLObject, Amount, Predicate): ...@@ -444,6 +444,7 @@ class BuilderMixin(XMLObject, Amount, Predicate):
if not has_consumption_movement: if not has_consumption_movement:
return [] return []
from_date = date
# 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(
...@@ -495,7 +496,7 @@ class BuilderMixin(XMLObject, Amount, Predicate): ...@@ -495,7 +496,7 @@ class BuilderMixin(XMLObject, Amount, Predicate):
if start_date < supply.getStartDateRangeMin(): if start_date < supply.getStartDateRangeMin():
# As we are going to need to go further in time to check if new Movements are needed # As we are going to need to go further in time to check if new Movements are needed
# we need to keep inventory correct # we need to keep inventory correct
future_inventory_to_date += quantity #future_inventory_to_date += quantity
for date, total_inventory, quantity, portal_type in period_history_list: for date, total_inventory, quantity, portal_type in period_history_list:
future_inventory_to_date += quantity future_inventory_to_date += quantity
continue continue
......
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