Commit 31f2ef9e authored by iv's avatar iv

ERP5Workflow: use inheritance in the WorklistVariable (parent: WorkflowVariable)

parent 46bca9e5
......@@ -26,34 +26,18 @@
#
##############################################################################
from AccessControl import ClassSecurityInfo
from Products.CMFCore.Expression import Expression
from Products.DCWorkflow.Guard import Guard
from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5Type.id_as_reference import IdAsReferenceMixin
from Products.ERP5Type.XMLObject import XMLObject
from Products.ERP5Workflow.Document.WorkflowVariable import WorkflowVariable
from Products.ERP5Type import PropertySheet
class WorklistVariable(IdAsReferenceMixin("variable_", "prefix"), XMLObject):
class WorklistVariable(WorkflowVariable):
"""
A ERP5 Worklist Variable which serves as dynamic variable of Worklist.
This type of object has 3 values:
This type of object has 3 values:
- reference as Title;
- variable_value;
- variable_expression which will override default when it's set.
"""
meta_type = 'ERP5 Variable'
portal_type = 'Worklist Variable'
add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
variable_value = ''
variable_expression = None # Overrides variable_value if set
default_reference = ''
# Declarative security
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative properties
property_sheets = (
......
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