Commit 769e5eb0 authored by Aurel's avatar Aurel

pass movement_list to after-script so that we can work with temp objects

parent fbe82ef8
...@@ -690,17 +690,23 @@ class BuilderMixin(XMLObject, Amount, Predicate): ...@@ -690,17 +690,23 @@ class BuilderMixin(XMLObject, Amount, Predicate):
# the callable object is a Python Script. # the callable object is a Python Script.
meta_type = getattr(script, 'meta_type', None) meta_type = getattr(script, 'meta_type', None)
if meta_type == 'Script (Python)': if meta_type == 'Script (Python)':
# check if the script accepts related_simulation_movement_path_list # check parameters accepted by the script
for param in script.params().split(','): for param in script.params().split(','):
param = param.split('=', 1)[0].strip() param = param.split('=', 1)[0].strip()
if param == "movement_list": # XXX-Aurel: path does not work with temp objects
script(movement_list=movement_list)
break
if param == 'related_simulation_movement_path_list' \ if param == 'related_simulation_movement_path_list' \
or param.startswith('**'): or param.startswith('**'):
script(related_simulation_movement_path_list=related_simulation_movement_path_list)
break break
else: else:
script() script()
continue continue
else:
script(related_simulation_movement_path_list=related_simulation_movement_path_list) script(related_simulation_movement_path_list=related_simulation_movement_path_list)
security.declareProtected(Permissions.AccessContentsInformation, security.declareProtected(Permissions.AccessContentsInformation,
'getMovementGroupList') 'getMovementGroupList')
def getMovementGroupList(self, portal_type=None, collect_order_group=None, def getMovementGroupList(self, portal_type=None, collect_order_group=None,
......
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