Commit 54fcd3a3 authored by Aurel's avatar Aurel

input_movement_list of build can also be a list of objects


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31185 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent bea94fbd
...@@ -82,7 +82,7 @@ class BPMBuilder(Alarm): ...@@ -82,7 +82,7 @@ class BPMBuilder(Alarm):
security.declareProtected(Permissions.View, 'build') security.declareProtected(Permissions.View, 'build')
def build(self, tag=None, input_movement_list=None, def build(self, tag=None, input_movement_list=None,
existing_delivery_list=None, select_method_dict=None, **kwargs): existing_delivery_list=None, select_method_dict=None, **kwargs):
"""Builds document according to self configuration mixed with passed parameters """Builds document according to self configuration mixed with passed parameters
Selecting parameters (like input movement list) might be passed directly Selecting parameters (like input movement list) might be passed directly
...@@ -109,9 +109,13 @@ class BPMBuilder(Alarm): ...@@ -109,9 +109,13 @@ class BPMBuilder(Alarm):
delivery_relative_url_list=existing_delivery_list, delivery_relative_url_list=existing_delivery_list,
**select_method_dict) **select_method_dict)
else: else:
# movements were passed directly # movements were passed directly either by url or by value
input_movement_value_list = [self.unrestrictedTraverse(relative_url) for if isinstance(input_movement_list[0], str):
relative_url in input_movement_list] input_movement_value_list = [self.unrestrictedTraverse(relative_url) for
relative_url in input_movement_list]
else:
input_movement_value_list = input_movement_list
# Collect # Collect
root_group_node = self.collectMovement(input_movement_value_list) root_group_node = self.collectMovement(input_movement_value_list)
# Build # Build
......
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