diff --git a/bt5/erp5_web/WorkflowTemplateItem/portal_workflow/category_publication_workflow/scripts/expireAll.xml b/bt5/erp5_web/WorkflowTemplateItem/portal_workflow/category_publication_workflow/scripts/expireAll.xml index 7d0ff56b228d8c2894578a4168bb8e4405c8a93a..df06ffd474f7f88325063c5420a58d8c034ffaa4 100644 --- a/bt5/erp5_web/WorkflowTemplateItem/portal_workflow/category_publication_workflow/scripts/expireAll.xml +++ b/bt5/erp5_web/WorkflowTemplateItem/portal_workflow/category_publication_workflow/scripts/expireAll.xml @@ -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> diff --git a/bt5/erp5_web/bt/revision b/bt5/erp5_web/bt/revision index 1275ac80ab34cd97af8756ee407a6b8ffb5d9958..a0e999ab2831dde57811a032822b93512532bc9a 100644 --- a/bt5/erp5_web/bt/revision +++ b/bt5/erp5_web/bt/revision @@ -1 +1 @@ -859 \ No newline at end of file +860 \ No newline at end of file