Commit 5f7fd311 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

inherit AcceptSolver and AdoptSolver in UnifySolver, because it is a mixture of both solvers.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31891 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e94df82d
...@@ -30,11 +30,10 @@ ...@@ -30,11 +30,10 @@
import zope.interface import zope.interface
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet, interfaces from Products.ERP5Type import Permissions, PropertySheet, interfaces
from Products.ERP5Type.XMLObject import XMLObject from Products.ERP5.Document.AcceptSolver import AcceptSolver
from Products.ERP5.mixin.solver import SolverMixin from Products.ERP5.Document.AdoptSolver import AdoptSolver
from Products.ERP5.mixin.configurable import ConfigurableMixin
class UnifySolver(SolverMixin, ConfigurableMixin, XMLObject): class UnifySolver(AcceptSolver, AdoptSolver):
""" """
""" """
meta_type = 'ERP5 Unify Solver' meta_type = 'ERP5 Unify Solver'
...@@ -76,9 +75,10 @@ class UnifySolver(SolverMixin, ConfigurableMixin, XMLObject): ...@@ -76,9 +75,10 @@ class UnifySolver(SolverMixin, ConfigurableMixin, XMLObject):
[x.getDeliveryRelatedValueList() \ [x.getDeliveryRelatedValueList() \
for x in self.getDeliveryValue().getMovementList()], []) for x in self.getDeliveryValue().getMovementList()], [])
for simulation_movement in simulation_movement_list: for simulation_movement in simulation_movement_list:
if not simulation_movement.isPropertyRecorded(solved_property): value_dict = {solved_property:new_value}
simulation_movement.recordProperty(solved_property) self._solveRecursively(simulation_movement, value_dict)
simulation_movement.setProperty(solved_property, new_value) self._clearRecordedPropertyRecursively(simulation_movement,
solved_property)
simulation_movement.expand() simulation_movement.expand()
# Finish solving # Finish solving
self.succeed() 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