Commit 97d10508 authored by Romain Courteaud's avatar Romain Courteaud

Check the result of the search movement method (in order to catch site

management mistake).


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@4242 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7fd525fb
......@@ -128,6 +128,19 @@ class DeliveryBuilder(OrderBuilder):
movement_list = filter(lambda x: x.getDeliveryRelatedValueList()==[],
movement_list)
# XXX Add predicate test
# XXX FIXME Check that there is no double in the list
# Because we can't trust simulation_select_method
# Example: simulation_select_method is not tested enough
mvt_dict = {}
for movement in movement_list:
if mvt_dict.has_key(movement):
raise "SelectMethodError", \
"%s return %s twice (or more)" % \
(str(self.simulation_select_method_id),
str(movement.getRelativeUrl()))
else:
mvt_dict[movement] = 1
# Return result
return movement_list
def _setDeliveryMovementProperties(self, delivery_movement,
......
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