Commit 34b3f861 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

revert r31281, r31992, r31294, because 'property to be solved' should be...

revert r31281, r31992, r31294, because 'property to be solved' should be specified in each Solver portal type itself and we don't need indexed relation between solver decision and solver.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31305 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 889288b1
...@@ -66,8 +66,7 @@ class AcceptSolver(SolverMixin, XMLObject): ...@@ -66,8 +66,7 @@ class AcceptSolver(SolverMixin, XMLObject):
solved_property = self._getPortalTypeValue().getTestedProperty() solved_property = self._getPortalTypeValue().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():
portal_type='Simulation Movement'):
if not simulation_movement.isPropertyRecorded(solved_property): if not simulation_movement.isPropertyRecorded(solved_property):
simulation_movement.recordProperty(solved_property) simulation_movement.recordProperty(solved_property)
# XXX hard coded # XXX hard coded
......
...@@ -792,8 +792,7 @@ class Delivery(XMLObject, ImmobilisationDelivery): ...@@ -792,8 +792,7 @@ class Delivery(XMLObject, ImmobilisationDelivery):
# we might use a zsql method, because it can be very slow # we might use a zsql method, because it can be very slow
for m in self.getMovementList(): for m in self.getMovementList():
if m.isSimulated(): if m.isSimulated():
sim_movement_list = m.getDeliveryRelatedValueList( sim_movement_list = m.getDeliveryRelatedValueList()
portal_type='Simulation Movement') # XXX hardcoded
for sim_movement in sim_movement_list: for sim_movement in sim_movement_list:
if sim_movement.getRootAppliedRule().getPath() \ if sim_movement.getRootAppliedRule().getPath() \
not in excluded_rule_path_list: not in excluded_rule_path_list:
......
...@@ -493,8 +493,7 @@ class Movement(XMLObject, Amount): ...@@ -493,8 +493,7 @@ class Movement(XMLObject, Amount):
Return a list of messages that contains the divergences Return a list of messages that contains the divergences
""" """
divergence_list = [] divergence_list = []
for simulation_movement in self.getDeliveryRelatedValueList( for simulation_movement in self.getDeliveryRelatedValueList():
portal_type='Simulation Movement'): # XXX hardcoded
divergence_list.extend(simulation_movement.getDivergenceList()) divergence_list.extend(simulation_movement.getDivergenceList())
return divergence_list return divergence_list
......
...@@ -65,8 +65,7 @@ class QuantitySplitSolver(XMLObject): ...@@ -65,8 +65,7 @@ class QuantitySplitSolver(XMLObject):
""" """
for delivery_line in self.getDeliveryValueList(): for delivery_line in self.getDeliveryValueList():
decision_quantity = delivery_line.getQuantity() decision_quantity = delivery_line.getQuantity()
simulation_movement_list = self.getDeliveryRelatedValueList( simulation_movement_list = self.getDeliveryRelatedValueList()
portal_type='Simulation Movement')
delivery_solver = self.portal_solvers.newDeliverySolver(self.getDeliverySolver(), simulation_movement_list) delivery_solver = self.portal_solvers.newDeliverySolver(self.getDeliverySolver(), simulation_movement_list)
# Update the quantity using delivery solver algorithm # Update the quantity using delivery solver algorithm
split_list = delivery_solver.setTotalQuantity(decision_quantity) split_list = delivery_solver.setTotalQuantity(decision_quantity)
......
...@@ -64,9 +64,7 @@ class SolverDecision(XMLObject): ...@@ -64,9 +64,7 @@ class SolverDecision(XMLObject):
meta_type = 'ERP5 Solver Decision' meta_type = 'ERP5 Solver Decision'
portal_type = 'Solver Decision' portal_type = 'Solver Decision'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
# XXX we need to index Solver Decision so as to find the related Solver isIndexable = 0 # We do not want to fill the catalog with objects on which we need no reporting
# Decision document from a Target Solver document.
# isIndexable = 0 # We do not want to fill the catalog with objects on which we need no reporting
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
......
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