Commit 707f81a4 authored by wenjie.zheng's avatar wenjie.zheng

ERP5Type.py: add ERP5 interaction workflow compatibility at intitialization step.

parent 8b09bfe0
...@@ -242,6 +242,7 @@ class ERP5TypeInformation(XMLObject, ...@@ -242,6 +242,7 @@ class ERP5TypeInformation(XMLObject,
property_sheet_list = () property_sheet_list = ()
base_category_list = () base_category_list = ()
erp5workflow_list = () erp5workflow_list = ()
interaction_workflow_list = ()
init_script = '' init_script = ''
product = 'ERP5Type' product = 'ERP5Type'
hidden_content_type_list = () hidden_content_type_list = ()
...@@ -424,6 +425,12 @@ class ERP5TypeInformation(XMLObject, ...@@ -424,6 +425,12 @@ class ERP5TypeInformation(XMLObject,
ERP5Workflow = workflow_module._getOb(ERP5Workflow_id) ERP5Workflow = workflow_module._getOb(ERP5Workflow_id)
ERP5Workflow.initializeDocument(ob) ERP5Workflow.initializeDocument(ob)
for Workflow_id in self.getTypeInteractionWorkflowList():
workflow_module = portal.getDefaultModule(portal_type="Workflow")
if workflow_module is not None:
ERP5Workflow = workflow_module._getOb(Workflow_id)
ERP5Workflow.initializeDocument(ob)
if not temp_object: if not temp_object:
init_script = self.getTypeInitScriptId() init_script = self.getTypeInitScriptId()
if init_script: if init_script:
...@@ -461,6 +468,12 @@ class ERP5TypeInformation(XMLObject, ...@@ -461,6 +468,12 @@ class ERP5TypeInformation(XMLObject,
"""Getter for 'type_workflow' property""" """Getter for 'type_workflow' property"""
return list(self.erp5workflow_list) return list(self.erp5workflow_list)
security.declareProtected(Permissions.AccessContentsInformation,
'getInteractionWorkflowList')
def getTypeInteractionWorkflowList(self):
"""Getter for 'type_workflow' property"""
return list(self.interaction_workflow_list)
def getTypePropertySheetValueList(self): def getTypePropertySheetValueList(self):
type_property_sheet_list = self.getTypePropertySheetList() type_property_sheet_list = self.getTypePropertySheetList()
if not type_property_sheet_list: if not type_property_sheet_list:
......
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