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