Commit 90d92f4e authored by Yoshinori Okuji's avatar Yoshinori Okuji

New method, getEventState.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@739 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 4ab6a0bc
......@@ -30,6 +30,7 @@ from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet, Constraint, Interface
from Products.ERP5.Document.Document import Document
from Products.CMFCore.utils import getToolByName
class Event(Document):
"""
......@@ -104,3 +105,11 @@ an event."""
)
}
security.declareProtected(Permissions.AccessContentsInformation, 'getSimulationState')
def getEventState(self, id_only=1):
"""
Returns the current state in simulation
"""
portal_workflow = getToolByName(self, 'portal_workflow')
wf = portal_workflow.getWorkflowById('event_workflow')
return wf._getWorkflowStateOf(self, id_only=id_only )
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