[Erp5-report] r29547 - in /erp5/trunk/bt5/erp5_web: WorkflowTemplateItem/portal_workflow/ca...

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Oct 9 18:28:03 CEST 2009


Author: luke
Date: Fri Oct  9 18:28:02 2009
New Revision: 29547

URL: http://svn.erp5.org?rev=29547&view=rev
Log:
 - use workflow tool directly to access isTransitionPossible

Modified:
    erp5/trunk/bt5/erp5_web/WorkflowTemplateItem/portal_workflow/category_publication_workflow/scripts/expireAll.xml
    erp5/trunk/bt5/erp5_web/bt/revision

Modified: erp5/trunk/bt5/erp5_web/WorkflowTemplateItem/portal_workflow/category_publication_workflow/scripts/expireAll.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_web/WorkflowTemplateItem/portal_workflow/category_publication_workflow/scripts/expireAll.xml?rev=29547&r1=29546&r2=29547&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_web/WorkflowTemplateItem/portal_workflow/category_publication_workflow/scripts/expireAll.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_web/WorkflowTemplateItem/portal_workflow/category_publication_workflow/scripts/expireAll.xml [utf8] Fri Oct  9 18:28:02 2009
@@ -55,13 +55,15 @@
             <key> <string>_body</string> </key>
             <value> <string>object = state_change[\'object\']\n
 \n
-if context.isTransitionPossible(object, \'expire\'):\n
+workflow_tool = object.getPortalObject().portal_workflow\n
+\n
+if workflow_tool.isTransitionPossible(object, \'expire\'):\n
   object.expire()\n
 \n
-if context.isTransitionPossible(object, \'expire_protected\'):\n
+if workflow_tool.isTransitionPossible(object, \'expire_protected\'):\n
   object.expireProtected()\n
 \n
-if context.isTransitionPossible(object, \'expire_published\'):\n
+if workflow_tool.isTransitionPossible(object, \'expire_published\'):\n
   object.expirePublished()\n
 </string> </value>
         </item>
@@ -103,7 +105,7 @@
                             <string>_getitem_</string>
                             <string>object</string>
                             <string>_getattr_</string>
-                            <string>context</string>
+                            <string>workflow_tool</string>
                           </tuple>
                         </value>
                     </item>

Modified: erp5/trunk/bt5/erp5_web/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_web/bt/revision?rev=29547&r1=29546&r2=29547&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_web/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_web/bt/revision [utf8] Fri Oct  9 18:28:02 2009
@@ -1,1 +1,1 @@
-859
+860




More information about the Erp5-report mailing list