From 9014e1209beb982db8a52c023428ef87ffa44c18 Mon Sep 17 00:00:00 2001 From: Nicolas Dumazet <nicolas.dumazet@nexedi.com> Date: Thu, 20 Jan 2011 08:36:19 +0000 Subject: [PATCH] pass along transition_id_set git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@42501 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5Type/Base.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/product/ERP5Type/Base.py b/product/ERP5Type/Base.py index 2f47faabc1..ebe006105b 100644 --- a/product/ERP5Type/Base.py +++ b/product/ERP5Type/Base.py @@ -719,7 +719,11 @@ def initializePortalTypeDynamicWorkflowMethods(self, klass, ptype, prop_holder, method_id_matcher = re.compile(imethod_id).match # queue transitions using regexps for later examination - interaction_queue.append((wf_id, tr_id, tdef, method_id_matcher)) + interaction_queue.append((wf_id, + tr_id, + transition_id_set, + tdef.once_per_transaction, + method_id_matcher)) # XXX - class stuff is missing here method_id_list = filter(method_id_matcher, all_method_id_list) @@ -769,14 +773,14 @@ def initializePortalTypeDynamicWorkflowMethods(self, klass, ptype, prop_holder, # We need to run this part twice in order to handle interactions of interactions # ex. an interaction workflow creates a workflow method which matches # the regexp of another interaction workflow - for wf_id, tr_id, tdef, method_id_matcher in interaction_queue: + for wf_id, tr_id, transition_id_set, once, method_id_matcher in interaction_queue: for method_id in filter(method_id_matcher, added_method_set): # method must already exist and be a workflow method method = getattr(klass, method_id) transition_id = method.getTransitionId() if transition_id in transition_id_set: method.registerTransitionAlways(ptype, wf_id, transition_id) - if tdef.once_per_transaction: + if once: method.registerTransitionOncePerTransaction(ptype, wf_id, tr_id) else: method.registerTransitionAlways(ptype, wf_id, tr_id) -- 2.30.9