Commit 31f2ef9e authored by iv's avatar iv

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

parent 46bca9e5
...@@ -26,34 +26,18 @@ ...@@ -26,34 +26,18 @@
# #
############################################################################## ##############################################################################
from AccessControl import ClassSecurityInfo from Products.ERP5Workflow.Document.WorkflowVariable import WorkflowVariable
from Products.CMFCore.Expression import Expression from Products.ERP5Type import PropertySheet
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
class WorklistVariable(IdAsReferenceMixin("variable_", "prefix"), XMLObject): class WorklistVariable(WorkflowVariable):
""" """
A ERP5 Worklist Variable which serves as dynamic variable of Worklist. 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; - reference as Title;
- variable_value; - variable_value;
- variable_expression which will override default when it's set. - 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 # Declarative properties
property_sheets = ( 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