Commit baae0e72 authored by Alexandre Boeglin's avatar Alexandre Boeglin

- Movement_solveMovement should be a python script

- allow to specify delivery_solver, target_solver as parameters


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@15206 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 3a2709b5
...@@ -330,7 +330,8 @@ class Delivery(XMLObject, ImmobilisationDelivery): ...@@ -330,7 +330,8 @@ class Delivery(XMLObject, ImmobilisationDelivery):
self.converge() self.converge()
def splitAndDeferMovementList(self, start_date=None, stop_date=None, def splitAndDeferMovementList(self, start_date=None, stop_date=None,
movement_uid_list=[], delivery_builder=None): movement_uid_list=[], delivery_solver=None,
target_solver='CopyToTarget', delivery_builder=None):
""" """
this method will unlink and delete movements in movement_uid_list and this method will unlink and delete movements in movement_uid_list and
rebuild a new Packing List with them. rebuild a new Packing List with them.
...@@ -365,8 +366,8 @@ class Delivery(XMLObject, ImmobilisationDelivery): ...@@ -365,8 +366,8 @@ class Delivery(XMLObject, ImmobilisationDelivery):
build_tag = '%s_splitAndDefer_build' % self.getRelativeUrl() build_tag = '%s_splitAndDefer_build' % self.getRelativeUrl()
# call solver and expand on deferrd movements # call solver and expand on deferrd movements
for movement in movement_list: for movement in movement_list:
movement.activate(tag=solver_tag).solveMovement( movement.activate(tag=solver_tag).Movement_solveMovement(
None, 'CopyToTarget') delivery_solver, target_solver)
tag_list.append(solver_tag) tag_list.append(solver_tag)
for s_m in deferred_simulation_movement_list: for s_m in deferred_simulation_movement_list:
s_m.activate(after_tag=tag_list[:], tag=expand_tag).expand() s_m.activate(after_tag=tag_list[:], tag=expand_tag).expand()
......
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