Commit 01bf21de authored by Sebastien Robin's avatar Sebastien Robin

added solveMovement


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@4213 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 62970db9
...@@ -46,7 +46,7 @@ class TargetSolver: ...@@ -46,7 +46,7 @@ class TargetSolver:
to update parent target to update parent target
""" """
def __init__(self, additional_parameters=None,**kw): def __init__(self, additional_parameters=None,activate_kw=None,**kw):
""" """
Creates an instance of TargetSolver with parameters Creates an instance of TargetSolver with parameters
""" """
...@@ -54,6 +54,9 @@ class TargetSolver: ...@@ -54,6 +54,9 @@ class TargetSolver:
if additional_parameters is None: if additional_parameters is None:
additional_parameters = {} additional_parameters = {}
self.additional_parameters = additional_parameters self.additional_parameters = additional_parameters
if activate_kw is None:
activate_kw = {}
self.activate_kw = activate_kw
self.previous_target = {} self.previous_target = {}
def solve(self, simulation_movement): def solve(self, simulation_movement):
...@@ -79,6 +82,16 @@ class TargetSolver: ...@@ -79,6 +82,16 @@ class TargetSolver:
for simulation_movement in simulation_movement_list: for simulation_movement in simulation_movement_list:
self.solve(simulation_movement) self.solve(simulation_movement)
def solveMovement(self, movement):
"""
Called in case it is needed for the solving process
"""
# apply to all movements
simulation_movement_list = movement.getDeliveryRelatedValueList(
portal_type="Simulation Movement")
for simulation_movement in simulation_movement_list:
self.solve(simulation_movement)
def close(self): def close(self):
""" """
After resolution has taken place, solver After resolution has taken place, solver
......
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