[Erp5-report] r42501 nicolas.dumazet - /erp5/trunk/products/ERP5Type/Base.py

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Jan 20 09:36:19 CET 2011


Author: nicolas.dumazet
Date: Thu Jan 20 09:36:19 2011
New Revision: 42501

URL: http://svn.erp5.org?rev=42501&view=rev
Log:
pass along transition_id_set

Modified:
    erp5/trunk/products/ERP5Type/Base.py

Modified: erp5/trunk/products/ERP5Type/Base.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/Base.py?rev=42501&r1=42500&r2=42501&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/Base.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/Base.py [utf8] Thu Jan 20 09:36:19 2011
@@ -719,7 +719,11 @@ def initializePortalTypeDynamicWorkflowM
           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 initializePortalTypeDynamicWorkflowM
   # 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)



More information about the Erp5-report mailing list