Commit 6c128616 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

no need to pass solved_property_list, because it is apparent from value_dict.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@33504 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 5c1dcb0a
......@@ -84,14 +84,12 @@ class AcceptSolver(SolverMixin, ConfigurableMixin, XMLObject):
value_dict.update({'quantity':new_quantity})
else:
value_dict.update({solved_property:new_value})
self._solveRecursively(simulation_movement, value_dict,
solved_property_list)
self._solveRecursively(simulation_movement, value_dict)
simulation_movement.expand()
# Finish solving
self.succeed()
def _solveRecursively(self, simulation_movement, value_dict=None,
property_id_list=None):
def _solveRecursively(self, simulation_movement, value_dict=None):
"""
Update value of the current simulation movement, and update
his parent movement.
......@@ -101,10 +99,9 @@ class AcceptSolver(SolverMixin, ConfigurableMixin, XMLObject):
if parent_movement.getPortalType() == 'Simulation Movement' and \
not parent_movement.isFrozen():
# backtrack to the parent movement while it is not frozen
self._solveRecursively(parent_movement, value_dict=value_dict,
property_id_list=property_id_list)
self._solveRecursively(parent_movement, value_dict=value_dict)
else:
for property_id in property_id_list:
for property_id in value_dict.iterkeys():
if not simulation_movement.isPropertyRecorded(property_id):
simulation_movement.recordProperty(property_id)
for property_id, value in value_dict.iteritems():
......
......@@ -77,8 +77,7 @@ class UnifySolver(AcceptSolver):
for x in self.getDeliveryValue().getMovementList()], [])
for simulation_movement in simulation_movement_list:
value_dict = {solved_property:new_value}
self._solveRecursively(simulation_movement, value_dict,
[solved_property])
self._solveRecursively(simulation_movement, value_dict)
simulation_movement.expand()
# Finish solving
self.succeed()
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