Commit 6684eff4 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

'delivery' category is also used to record the relation between a solver...

'delivery' category is also used to record the relation between a solver decision and a delivery movement, so we need to specify portal_type in order to get related simulation movements only.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31281 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent bcd8fccd
......@@ -60,7 +60,8 @@ class AcceptSolver(XMLObject):
solved_property = self.getPortalTypeValue().getTestedProperty()
for movement in self.getDeliveryValueList():
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):
simulation_movement.recordProperty(solved_property)
solved_property.setProperty(solved_property, new_value)
......
......@@ -64,7 +64,8 @@ class QuantitySplitSolver(XMLObject):
"""
for delivery_line in self.getDeliveryValueList():
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)
# Update the quantity using delivery solver algorithm
split_list = delivery_solver.setTotalQuantity(decision_quantity)
......
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