Commit 2574dd3f authored by Romain Courteaud's avatar Romain Courteaud

Remove duplicated code.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@4477 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 42c1f2fd
...@@ -77,10 +77,7 @@ class TargetSolver: ...@@ -77,10 +77,7 @@ class TargetSolver:
""" """
# Then apply to all movements # Then apply to all movements
for movement in delivery.getMovementList(): for movement in delivery.getMovementList():
simulation_movement_list = movement.getDeliveryRelatedValueList( self.solveMovement(movement)
portal_type="Simulation Movement")
for simulation_movement in simulation_movement_list:
self.solve(simulation_movement)
def solveMovement(self, movement): def solveMovement(self, movement):
""" """
...@@ -88,7 +85,7 @@ class TargetSolver: ...@@ -88,7 +85,7 @@ class TargetSolver:
""" """
# apply to all movements # apply to all movements
simulation_movement_list = movement.getDeliveryRelatedValueList( simulation_movement_list = movement.getDeliveryRelatedValueList(
portal_type="Simulation Movement") portal_type="Simulation Movement")
solved_movement_list = [] solved_movement_list = []
for simulation_movement in simulation_movement_list: for simulation_movement in simulation_movement_list:
solved_movement_list.append(self.solve(simulation_movement)) solved_movement_list.append(self.solve(simulation_movement))
......
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