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

builder mixin: Set Price to 0 on movements for optimization

parent 27de9d58
......@@ -395,6 +395,8 @@ class BuilderMixin(XMLObject, Amount, Predicate):
)
movement.edit(
resource_value=resource_value,
# Hardcoded price for optimization
price=0,
destination_value=supply.getDestinationValue(),
destination_section_value=supply.getDestinationSectionValue(),
source_value=supply.getSourceValue(),
......@@ -429,7 +431,9 @@ class BuilderMixin(XMLObject, Amount, Predicate):
)
#previous_movement_list= []
for brain in previous_movement_list:
brain.getObject().setQuantity(0)
previous_movement = brain.getObject()
previous_movement.setQuantity(0)
previous_movement.setPrice(0)
# Calculate first possible shipment:
first_shipment_date = max(
......
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