[Erp5-report] r15978 - /erp5/trunk/products/ERP5/InteractionWorkflow.py

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Aug 31 14:19:17 CEST 2007


Author: jp
Date: Fri Aug 31 14:19:16 2007
New Revision: 15978

URL: http://svn.erp5.org?rev=15978&view=rev
Log:
Mimic implementation of DCWorkflow.

Modified:
    erp5/trunk/products/ERP5/InteractionWorkflow.py

Modified: erp5/trunk/products/ERP5/InteractionWorkflow.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/InteractionWorkflow.py?rev=15978&r1=15977&r2=15978&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/InteractionWorkflow.py (original)
+++ erp5/trunk/products/ERP5/InteractionWorkflow.py Fri Aug 31 14:19:16 2007
@@ -178,12 +178,11 @@
         NOTE: this method is not used in ERP5 because
         of transition_list approach
         '''
-        for t in self.interactions.values():
-            if t.trigger_type == TRIGGER_WORKFLOW_METHOD:
-                if method_id in t.method_id:
-                    if ((t.portal_type_filter is None or ob.getPortalType() in t.portal_type_filter)
-                      and self._checkTransitionGuard(t, ob)):
-                        return 1
+        tdef = self.interactions.get(method_id, None)
+        if (tdef is not None and
+          tdef.trigger_type == TRIGGER_WORKFLOW_METHOD and
+          self._checkTransitionGuard(tdef, ob)):
+          return 1
         return 0
 
 




More information about the Erp5-report mailing list