Commit 48b44029 authored by Ayush Tiwari's avatar Ayush Tiwari

bt5_config: Add workflow_list as attribute to Base Type

parent 1e9ba456
...@@ -227,6 +227,7 @@ class ERP5TypeInformation(XMLObject, ...@@ -227,6 +227,7 @@ class ERP5TypeInformation(XMLObject,
acquire_local_roles = False acquire_local_roles = False
property_sheet_list = () property_sheet_list = ()
base_category_list = () base_category_list = ()
workflow_list = ()
init_script = '' init_script = ''
product = 'ERP5Type' product = 'ERP5Type'
hidden_content_type_list = () hidden_content_type_list = ()
...@@ -333,6 +334,23 @@ class ERP5TypeInformation(XMLObject, ...@@ -333,6 +334,23 @@ class ERP5TypeInformation(XMLObject,
def getTypeInitScriptId(self): def getTypeInitScriptId(self):
return return
def getTypeWorkflowList(self):
"""Getter for 'type_workflow' property"""
return list(self.workflow_list)
security.declareProtected(Permissions.ModifyPortalContent,
'setTypeWorkflowList')
def setTypeWorkflowList(self, type_workflow_list):
"""Setter for 'type_workflow' property"""
# We use 'sorted' below to keep an order in the workflow list. Without
# this line, the actions can have different order depending on the order
# set during the installation or later. This is bad!
# It might not be the ideal solution, if you need to have the workflow
# defined in a specific order. Then, your new implementation should use
# indexes on workflows as in portal types action's priority.
# Note: 'sorted' also convert a tuple or a set to a list
self.workflow_list = sorted(type_workflow_list)
security.declarePrivate('_guessMethodAliases') security.declarePrivate('_guessMethodAliases')
def _guessMethodAliases(self): def _guessMethodAliases(self):
""" Override this method to disable Method Aliases in ERP5. """ Override this method to disable Method Aliases in ERP5.
......
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