Commit 3c61f0b1 authored by wenjie.zheng's avatar wenjie.zheng

WorkflowScript.py: no more add prefix to Workflow Script id, now script can be call to execute.

parent cc186026
......@@ -35,7 +35,7 @@ from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5Type.ConsistencyMessage import ConsistencyMessage
from Products.ERP5Type.id_as_reference import IdAsReferenceMixin
class WorkflowScript(PythonScript, IdAsReferenceMixin("script_", "prefix")):
class WorkflowScript(PythonScript, IdAsReferenceMixin("", "prefix")):
meta_type = 'ERP5 Python Script'
portal_type = 'Workflow Script'
add_permission = Permissions.AddPortalContent
......@@ -52,10 +52,6 @@ class WorkflowScript(PythonScript, IdAsReferenceMixin("script_", "prefix")):
, PropertySheet.WorkflowScript
)
def __call__(self):
r_url = self.REQUEST.get('URL')
return self.REQUEST.RESPONSE.redirect(r_url+'/view')
execute = PythonScript.__call__
InitializeClass(WorkflowScript)
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