Commit 4dc06a72 authored by Łukasz Nowak's avatar Łukasz Nowak

- use workflow tool directly to access isTransitionPossible


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@29547 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 2beb24de
......@@ -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 @@ if context.isTransitionPossible(object, \'expire_published\'):\n
<string>_getitem_</string>
<string>object</string>
<string>_getattr_</string>
<string>context</string>
<string>workflow_tool</string>
</tuple>
</value>
</item>
......
859
\ No newline at end of file
860
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment