Commit b1506dfe authored by Cédric Le Ninivin's avatar Cédric Le Ninivin Committed by Klaus Wölfel

builder mixin: Set Price to 0 on movements for optimization

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