[Erp5-report] r38674 fabien - in /experimental/bt5/erp5_credential: WorkflowTemplateItem/po...

nobody at svn.erp5.org nobody at svn.erp5.org
Mon Sep 27 16:30:38 CEST 2010


Author: fabien
Date: Mon Sep 27 16:30:34 2010
New Revision: 38674

URL: http://svn.erp5.org?rev=38674&view=rev
Log:
use isTransitionPossible instead of checking if the object is 'submitted'

Modified:
    experimental/bt5/erp5_credential/WorkflowTemplateItem/portal_workflow/credential_automatic_accept_interraction_workflow/scripts/Credential_accept.xml
    experimental/bt5/erp5_credential/bt/revision

Modified: experimental/bt5/erp5_credential/WorkflowTemplateItem/portal_workflow/credential_automatic_accept_interraction_workflow/scripts/Credential_accept.xml
URL: http://svn.erp5.org/experimental/bt5/erp5_credential/WorkflowTemplateItem/portal_workflow/credential_automatic_accept_interraction_workflow/scripts/Credential_accept.xml?rev=38674&r1=38673&r2=38674&view=diff
==============================================================================
--- experimental/bt5/erp5_credential/WorkflowTemplateItem/portal_workflow/credential_automatic_accept_interraction_workflow/scripts/Credential_accept.xml [utf8] (original)
+++ experimental/bt5/erp5_credential/WorkflowTemplateItem/portal_workflow/credential_automatic_accept_interraction_workflow/scripts/Credential_accept.xml [utf8] Mon Sep 27 16:30:34 2010
@@ -55,7 +55,9 @@
   The interaction use a system preference to call this script or not.\n
 """\n
 credential_object = state_change[\'object\']\n
-if credential_object.getValidationState() == \'submitted\':\n
+portal = state_change.getPortal()\n
+isTransitionPossible = portal.portal_workflow.isTransitionPossible\n
+if isTransitionPossible(credential_object, \'accept\'):\n
   credential_object.accept("Automatic accept")\n
 </string> </value>
         </item>
@@ -103,6 +105,8 @@ if credential_object.getValidationState(
                             <string>_getitem_</string>
                             <string>credential_object</string>
                             <string>_getattr_</string>
+                            <string>portal</string>
+                            <string>isTransitionPossible</string>
                           </tuple>
                         </value>
                     </item>

Modified: experimental/bt5/erp5_credential/bt/revision
URL: http://svn.erp5.org/experimental/bt5/erp5_credential/bt/revision?rev=38674&r1=38673&r2=38674&view=diff
==============================================================================
--- experimental/bt5/erp5_credential/bt/revision [utf8] (original)
+++ experimental/bt5/erp5_credential/bt/revision [utf8] Mon Sep 27 16:30:34 2010
@@ -1 +1 @@
-192
\ No newline at end of file
+193
\ No newline at end of file




More information about the Erp5-report mailing list