Commit dc12313d authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

same as 31281. 'delivery' category is also used to record the relation between...

same as 31281. '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@31294 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 116d4a23
......@@ -792,7 +792,8 @@ 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()
sim_movement_list = m.getDeliveryRelatedValueList(
portal_type='Simulation Movement') # XXX hardcoded
for sim_movement in sim_movement_list:
if sim_movement.getRootAppliedRule().getPath() \
not in excluded_rule_path_list:
......
......@@ -493,7 +493,8 @@ class Movement(XMLObject, Amount):
Return a list of messages that contains the divergences
"""
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())
return divergence_list
......
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