diff --git a/product/ERP5/Document/QuantitySplitMoveSolver.py b/product/ERP5/Document/QuantitySplitMoveSolver.py index a32496c747deaea7c45b124fcce9ea2b9d47fd93..e66cbd849627f838cccb920a3036e66a807d6c40 100644 --- a/product/ERP5/Document/QuantitySplitMoveSolver.py +++ b/product/ERP5/Document/QuantitySplitMoveSolver.py @@ -96,8 +96,6 @@ class QuantitySplitMoveSolver(QuantitySplitSolver): # from simulation divergence_list = delivery_to_move.getDivergenceList() if divergence_list: - """def _solveDivergence(self, document, property, solver, **kw):""" - """Solve divergence by using solver tool""" solver_process_tool = portal.portal_solver_processes solver_process = solver_process_tool.newSolverProcess(delivery_to_move) solver_decision, = [x for x in solver_process.contentValues() @@ -108,3 +106,10 @@ class QuantitySplitMoveSolver(QuantitySplitSolver): solver_decision.updateConfiguration(tested_property_list=['quantity']) solver_process.buildTargetSolverList() solver_process.solve() + + # Finish solving + if self.getPortalObject().portal_workflow.isTransitionPossible( + self, 'succeed'): + self.succeed() + solver_dict["new_movement_list"] = new_movement_list + return solver_dict