Commit cfd0e674 authored by Jérome Perrin's avatar Jérome Perrin

simplify applyToDeliveryRelatedMovement by using getMovementList


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@20689 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0e356f09
......@@ -246,25 +246,18 @@ class Delivery(XMLObject, ImmobilisationDelivery):
return container_list
def applyToDeliveryRelatedMovement(self, portal_type='Simulation Movement',
method_id = 'expand',**kw):
method_id='expand', **kw):
for my_simulation_movement in self.getDeliveryRelatedValueList(
portal_type = 'Simulation Movement'):
# And apply
getattr(my_simulation_movement.getObject(), method_id)(**kw)
for m in self.contentValues(filter={'portal_type':
self.getPortalMovementTypeList()}):
# And apply
getattr(my_simulation_movement.getObject(), method_id)(**kw)
for m in self.getMovementList():
# Find related in simulation
for my_simulation_movement in m.getDeliveryRelatedValueList(
portal_type = 'Simulation Movement'):
# And apply
getattr(my_simulation_movement.getObject(), method_id)(**kw)
for c in m.contentValues(filter={'portal_type':
self.getPortalMovementTypeList()}):
for my_simulation_movement in c.getDeliveryRelatedValueList(
portal_type = 'Simulation Movement'):
# And apply
getattr(my_simulation_movement.getObject(), method_id)(**kw)
#######################################################
# Causality computation
......
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