[Erp5-report] r42724 nicolas.dumazet - /erp5/trunk/products/ERP5/InteractionWorkflow.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Jan 28 08:25:47 CET 2011
Author: nicolas.dumazet
Date: Fri Jan 28 08:25:46 2011
New Revision: 42724
URL: http://svn.erp5.org?rev=42724&view=rev
Log:
simplify isWorkflowMethodSupported
Correct and update comment: we _do_ use isWorkflowMethodSupported to check the
guard of a transition before running it, check Base.WorkflowMethod implementation.
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=42724&r1=42723&r2=42724&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/InteractionWorkflow.py [utf8] (original)
+++ erp5/trunk/products/ERP5/InteractionWorkflow.py [utf8] Fri Jan 28 08:25:46 2011
@@ -174,19 +174,11 @@ class InteractionWorkflowDefinition (DCW
security.declarePrivate('isWorkflowMethodSupported')
def isWorkflowMethodSupported(self, ob, method_id):
'''
- Returns a true value if the given workflow is
- automatic with the propper method_id
-
- NOTE: this method is not used in ERP5 because
- of transition_list approach
+ Returns a true value if the given workflow method
+ is supported in the current state.
'''
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
-
+ return tdef is not None and self._checkTransitionGuard(tdef, ob)
security.declarePrivate('wrapWorkflowMethod')
def wrapWorkflowMethod(self, ob, method_id, func, args, kw):
More information about the Erp5-report
mailing list