Commit ffe133ba authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

fix the way to get 'property to be solved' from Solver document, that should...

fix the way to get 'property to be solved' from Solver document, that should be specified in each Solver portal type itself.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31303 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent cd51e872
...@@ -32,8 +32,9 @@ from AccessControl import ClassSecurityInfo ...@@ -32,8 +32,9 @@ from AccessControl import ClassSecurityInfo
from Products.CMFCore.utils import getToolByName from Products.CMFCore.utils import getToolByName
from Products.ERP5Type import Permissions, PropertySheet, interfaces from Products.ERP5Type import Permissions, PropertySheet, interfaces
from Products.ERP5Type.XMLObject import XMLObject from Products.ERP5Type.XMLObject import XMLObject
from Products.ERP5.mixin.solver import SolverMixin
class AcceptSolver(XMLObject): class AcceptSolver(SolverMixin, XMLObject):
""" """
""" """
meta_type = 'ERP5 Accept Solver' meta_type = 'ERP5 Accept Solver'
...@@ -62,9 +63,7 @@ class AcceptSolver(XMLObject): ...@@ -62,9 +63,7 @@ class AcceptSolver(XMLObject):
Adopt new property to simulation movements, with keeping the Adopt new property to simulation movements, with keeping the
original one recorded. original one recorded.
""" """
solver_decision = self.getSolverRelatedValue() solved_property = self._getPortalTypeValue().getTestedProperty()
divergence_tester = solver_decision.getCausalityValue()
solved_property = divergence_tester.getTestedProperty()
for movement in self.getDeliveryValueList(): for movement in self.getDeliveryValueList():
new_value = movement.getProperty(solved_property) new_value = movement.getProperty(solved_property)
for simulation_movement in movement.getDeliveryRelatedValueList( for simulation_movement in movement.getDeliveryRelatedValueList(
......
...@@ -43,3 +43,6 @@ class SolverMixin: ...@@ -43,3 +43,6 @@ class SolverMixin:
zope.interface.implements(interfaces.ISolver,) zope.interface.implements(interfaces.ISolver,)
# Implementation of ISolver # Implementation of ISolver
def _getPortalTypeValue(self):
return self.getPortalObject().portal_types._getOb(self.getPortalType())
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