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

pass movement list, not movement group, because movement group can be made of FakeMovement


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@3427 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1600e6c3
......@@ -227,8 +227,14 @@ class DeliveryBuilder(XMLObject, Amount, Predicate):
# Deliveries we are trying to update
delivery_select_method_id = self.getDeliverySelectMethodId()
if delivery_select_method_id not in ["", None]:
movement_list = []
for movement in movement_group.getMovementList() :
if movement.__class__.__name__ == "FakeMovement":
movement_list += movement.getMovementList()
else:
movement_list += [movement]
to_update_delivery_sql_list = getattr(self, delivery_select_method_id)\
(movement_group=movement_group)
(movement_list=movement_list)
delivery_to_update_list.extend([x.getObject() for x\
in to_update_delivery_sql_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