Commit 8f1ad111 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

set solver category on the delivery document in SolverTool.newSolverProcess() not in python script.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@33583 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 5ef6fc26
......@@ -59,15 +59,12 @@
solver_process = None\n
solver_list = context.getSolverValueList()\n
for i in solver_list:\n
# XXX if \'solving\' decision exists, what should we do?\n
if i.getValidationState() != \'solved\':\n
if i.getValidationState() == \'draft\':\n
solver_process = i\n
break\n
\n
if solver_process is None:\n
solver_process = context.getPortalObject().portal_solvers.newSolverProcess(context)\n
solver_list.append(solver_process.getRelativeUrl())\n
context.setSolverList(solver_list)\n
else:\n
# update existing solver process\n
solver_process.buildSolverDecisionList(context)\n
......
......@@ -157,6 +157,12 @@ class SolverTool(BaseTool):
# And build decisions
new_solver.buildSolverDecisionList(delivery_or_movement=delivery_or_movement,
temp_object=temp_object)
# Append the solver process into the delivery's solver category
delivery = delivery_or_movement.getRootDeliveryValue()
solver_list = delivery.getSolverValueList()
solver_list.append(new_solver)
delivery.setSolverValueList(solver_list)
return new_solver
def getSolverProcessValueList(self, delivery_or_movement=None, validation_state=None):
......
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