Commit 229073ec authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

propagate temp_object parameter to SolverProcess, and assign appropriate uids...

propagate temp_object parameter to SolverProcess, and assign appropriate uids for temporary Solver Decision documents that suits good for listbox UI.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31773 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 530c229b
...@@ -194,9 +194,16 @@ class SolverProcess(XMLObject, ActiveProcess): ...@@ -194,9 +194,16 @@ class SolverProcess(XMLObject, ActiveProcess):
# Now build the solver decision instances based on the previous # Now build the solver decision instances based on the previous
# grouping # grouping
# XXX-JPS: pseudocode for update (ie. rebuild) is not present # XXX-JPS: pseudocode for update (ie. rebuild) is not present
index = 1
for solver_decision_key, movement_dict in solver_decision_dict.items(): for solver_decision_key, movement_dict in solver_decision_dict.items():
new_decision = self.newContent(portal_type='Solver Decision', if temp_object:
temp_object=temp_object) new_decision = self.newContent(portal_type='Solver Decision',
temp_object=True,
#id=index,
uid='new_%s' % index)
index += 1
else:
new_decision = self.newContent(portal_type='Solver Decision')
new_decision._setDeliveryList(solver_decision_key[1]) new_decision._setDeliveryList(solver_decision_key[1])
new_decision._setCausality(solver_decision_key[0]) new_decision._setCausality(solver_decision_key[0])
for simulation_movement in movement_dict.keys(): for simulation_movement in movement_dict.keys():
......
...@@ -155,7 +155,8 @@ class SolverTool(BaseTool): ...@@ -155,7 +155,8 @@ class SolverTool(BaseTool):
new_solver = self.newContent(portal_type='Solver Process', new_solver = self.newContent(portal_type='Solver Process',
temp_object=temp_object) temp_object=temp_object)
# And build decisions # And build decisions
new_solver.buildSolverDecisionList(delivery_or_movement=delivery_or_movement) new_solver.buildSolverDecisionList(delivery_or_movement=delivery_or_movement,
temp_object=temp_object)
return new_solver return new_solver
def getSolverProcessValueList(self, delivery_or_movement=None, validation_state=None): 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