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

builder mixin: Set Price to 0 on movements for optimization

parent 41f89bd2
......@@ -384,6 +384,8 @@ class BuilderMixin(XMLObject, Amount, Predicate):
movement = newTempMovement(portal, "temp")
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(),
......@@ -418,7 +420,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