Commit 32bf69d3 authored by Jérome Perrin's avatar Jérome Perrin

Apply Luke's patch from

http://mail.nexedi.com/pipermail/erp5-dev/2008-June/001967.html 

If "optional" arguments (ie. with default values) were not passed, then the
method crash, this change makes that default values are supported.



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@22556 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f5f3d070
...@@ -271,6 +271,8 @@ class OrderBuilder(XMLObject, Amount, Predicate): ...@@ -271,6 +271,8 @@ class OrderBuilder(XMLObject, Amount, Predicate):
# Parameter initialization # Parameter initialization
if delivery_relative_url_list is None: if delivery_relative_url_list is None:
delivery_relative_url_list = [] delivery_relative_url_list = []
if movement_list is None:
movement_list = []
# Module where we can create new deliveries # Module where we can create new deliveries
portal = self.getPortalObject() portal = self.getPortalObject()
delivery_module = getattr(portal, self.getDeliveryModule()) delivery_module = getattr(portal, self.getDeliveryModule())
...@@ -529,6 +531,9 @@ class OrderBuilder(XMLObject, Amount, Predicate): ...@@ -529,6 +531,9 @@ class OrderBuilder(XMLObject, Amount, Predicate):
""" """
Call script on each delivery built Call script on each delivery built
""" """
# Parameter initialization
if movement_list is None:
movement_list = []
delivery_after_generation_script_id = \ delivery_after_generation_script_id = \
self.getDeliveryAfterGenerationScriptId() self.getDeliveryAfterGenerationScriptId()
related_simulation_movement_path_list = \ related_simulation_movement_path_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