Commit bd8f725b authored by Cédric Le Ninivin's avatar Cédric Le Ninivin Committed by Titouan Soulard

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

parent 48116158
...@@ -451,6 +451,7 @@ class BuilderMixin(XMLObject, Amount, Predicate): ...@@ -451,6 +451,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(
...@@ -502,7 +503,7 @@ class BuilderMixin(XMLObject, Amount, Predicate): ...@@ -502,7 +503,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