Commit cb868732 authored by wenjie.zheng's avatar wenjie.zheng Committed by Sebastien Robin

WorkflowScript.py: now allow script to generate prefixed id from reference.

parent 652b0787
...@@ -33,13 +33,13 @@ from Products.ERP5.Document.PythonScript import PythonScript ...@@ -33,13 +33,13 @@ from Products.ERP5.Document.PythonScript import PythonScript
from Products.ERP5.Document.Ticket import Ticket from Products.ERP5.Document.Ticket import Ticket
from Products.ERP5Type import Permissions, PropertySheet from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5Type.ConsistencyMessage import ConsistencyMessage from Products.ERP5Type.ConsistencyMessage import ConsistencyMessage
from Products.ERP5Type.XMLObject import XMLObject from Products.ERP5Type.id_as_reference import IdAsReferenceMixin
from zLOG import LOG, ERROR, DEBUG, WARNING
class WorkflowScript(PythonScript): class WorkflowScript(PythonScript, IdAsReferenceMixin("script_", "prefix")):
meta_type = 'ERP5 Python Script' meta_type = 'ERP5 Python Script'
portal_type = 'Workflow Script' portal_type = 'Workflow Script'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
default_reference = ''
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
...@@ -48,6 +48,7 @@ class WorkflowScript(PythonScript): ...@@ -48,6 +48,7 @@ class WorkflowScript(PythonScript):
, PropertySheet.XMLObject , PropertySheet.XMLObject
, PropertySheet.CategoryCore , PropertySheet.CategoryCore
, PropertySheet.DublinCore , PropertySheet.DublinCore
, PropertySheet.Reference
, PropertySheet.WorkflowScript , PropertySheet.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