Commit e8713a96 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

now tested property list should be taken from Target Solver document or its portal type.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@33958 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 3a692fdf
...@@ -63,8 +63,10 @@ class AcceptSolver(SolverMixin, ConfigurableMixin, XMLObject): ...@@ -63,8 +63,10 @@ class AcceptSolver(SolverMixin, ConfigurableMixin, 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.
""" """
solved_property_list = self.getCausalityValue().getCausalityValue(). \ configuration_dict = self.getConfigurationPropertyDict()
getTestedPropertyList() portal_type = self.getPortalObject().portal_types[self.getPortalType()]
solved_property_list = configuration_dict.get('tested_property_list',
portal_type.getTestedPropertyList())
for movement in self.getDeliveryValueList(): for movement in self.getDeliveryValueList():
simulation_movement_list = movement.getDeliveryRelatedValueList() simulation_movement_list = movement.getDeliveryRelatedValueList()
# if movement here is a delivery, we need to find simulation # if movement here is a delivery, we need to find simulation
......
...@@ -64,8 +64,10 @@ class AdoptSolver(SolverMixin, ConfigurableMixin, XMLObject): ...@@ -64,8 +64,10 @@ class AdoptSolver(SolverMixin, ConfigurableMixin, XMLObject):
""" """
Adopt new property to movements or deliveries. Adopt new property to movements or deliveries.
""" """
solved_property_list = self.getCausalityValue().getCausalityValue(). \ configuration_dict = self.getConfigurationPropertyDict()
getTestedPropertyList() portal_type = self.getPortalObject().portal_types[self.getPortalType()]
solved_property_list = configuration_dict.get('tested_property_list',
portal_type.getTestedPropertyList())
for movement in self.getDeliveryValueList(): for movement in self.getDeliveryValueList():
for solved_property in solved_property_list: for solved_property in solved_property_list:
# XXX hardcoded # XXX hardcoded
......
...@@ -61,9 +61,12 @@ class UnifySolver(AcceptSolver): ...@@ -61,9 +61,12 @@ class UnifySolver(AcceptSolver):
Adopt new property to simulation movements, with keeping the Adopt new property to simulation movements, with keeping the
original one recorded. original one recorded.
""" """
configuration_dict = self.getConfigurationPropertyDict()
portal_type = self.getPortalObject().portal_types[self.getPortalType()]
solved_property_list = configuration_dict.get('tested_property_list',
portal_type.getTestedPropertyList())
# XXX it does not support multiple tested properties. # XXX it does not support multiple tested properties.
solved_property = self.getCausalityValue().getCausalityValue(). \ solved_property = solved_property_list[0]
getTestedProperty()
for movement in self.getDeliveryValueList(): for movement in self.getDeliveryValueList():
configuration_dict = self.getConfigurationPropertyDict() configuration_dict = self.getConfigurationPropertyDict()
new_value = configuration_dict.get('value') new_value = configuration_dict.get('value')
......
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