Commit 0368b1dc authored by Ayush Tiwari's avatar Ayush Tiwari

bt5_config: Use bootstrap for BT for erp5_business_package as we have it in BT format for now

parent 0a73d402
......@@ -2216,15 +2216,23 @@ class ERP5Generator(PortalGenerator):
"""
Set up workflows for business templates
"""
workflow_list = ['business_template_building_workflow',
'business_template_installation_workflow']
manager_workflow_list = ['business_manager_building_workflow',
'business_manager_installation_workflow']
tool = p.portal_workflow
tool.manage_delObjects(filter(tool.hasObject, manager_workflow_list))
self.bootstrap_bm(tool, 'erp5_business_package', (
'portal_workflow/business_manager_building_workflow',
'portal_workflow/business_manager_installation_workflow',
'portal_types/Business Manager#type_workflow_list',
tool.manage_delObjects(filter(tool.hasObject, workflow_list))
self.bootstrap_bm(tool, 'erp5_core', (
'portal_workflow/business_template_installation_workflow',
'portal_workflow/business_template_building_workflow',
'portal_types/Business Template#type_workflow_list',
))
self.bootstrap(tool, 'erp5_business_package', 'WorkflowTemplateItem', (
'business_manager_building_workflow',
'business_manager_installation_workflow',
))
tool.setChainForPortalTypes(('Business Manager',), manager_workflow_list)
def setupIndex(self, p, **kw):
# Make sure all tools and folders have been indexed
......@@ -2378,7 +2386,7 @@ class ERP5Generator(PortalGenerator):
"""
template_tool = p.portal_templates
if template_tool.getInstalledBusinessTemplate('erp5_core') is None:
for bt in ('erp5_property_sheets', 'erp5_core',
for bt in ('erp5_core', 'erp5_business_package', 'erp5_property_sheets',
):
if not bt:
continue
......@@ -2391,8 +2399,7 @@ class ERP5Generator(PortalGenerator):
bt.install(**kw)
bt_list = []
for bt in (p.erp5_catalog_storage, 'erp5_jquery', 'erp5_xhtml_style',
'erp5_business_package'):
for bt in (p.erp5_catalog_storage, 'erp5_jquery', 'erp5_xhtml_style',):
url = getBootstrapBusinessTemplateUrl(bt)
bt = template_tool.download(url)
bt_list.append(bt)
......
......@@ -64,6 +64,7 @@ class PropertySheetTool(BaseTool):
from Products.ERP5.ERP5Site import ERP5Generator
ERP5Generator.bootstrap_bm(self, bt_name, (
'portal_property_sheets/BaseType',
'portal_property_sheets/BusinessTemplate',
'portal_property_sheets/Folder',
'portal_property_sheets/SimpleItem',
'portal_property_sheets/Version',
......
......@@ -132,11 +132,18 @@ class TypesTool(TypeProvider):
'portal_types/Business Property Item'
))
ERP5Generator.bootstrap_bm(self, 'erp5_core', (
'portal_types/Business Template',
'portal_types/Standard Property',
'portal_types/Acquired Property',
# the following ones are required to upgrade an existing site
'portal_types/Category Property',
))
# Bootstrap Business Manager as it'll be needed while installation
ERP5Generator.bootstrap(self, 'erp5_business_package', 'PortalTypeTemplateItem', (
'Business Manager',
'Business Item',
'Business Property Item'
))
def listContentTypes(self, container=None):
"""List content types from all providers
......
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