Commit bda4ca34 authored by Jérome Perrin's avatar Jérome Perrin

don't put SQL Catalog in business template, rather create it while adding an ERP5 Site

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@6339 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c677aa39
...@@ -860,11 +860,14 @@ class ERP5Generator(PortalGenerator): ...@@ -860,11 +860,14 @@ class ERP5Generator(PortalGenerator):
addSQLConnection('cmf_activity_sql_connection', 'CMF Activity SQL Server Connection', p.cmf_activity_sql_connection_string) addSQLConnection('cmf_activity_sql_connection', 'CMF Activity SQL Server Connection', p.cmf_activity_sql_connection_string)
elif p.cmf_activity_sql_connection_type == 'Z Gadfly': elif p.cmf_activity_sql_connection_type == 'Z Gadfly':
pass pass
# Create default methods in Catalog XXX
portal_catalog = getToolByName(p, 'portal_catalog') portal_catalog = getToolByName(p, 'portal_catalog')
if not portal_catalog.getSQLCatalog('erp5_mysql') and not update: if not portal_catalog.getSQLCatalog('erp5_mysql') and not update:
# Clear Catalog # Add a default SQL Catalog
portal_catalog.manage_catalogClear() addSQLCatalog = portal_catalog.manage_addProduct['ZSQLCatalog']\
.manage_addSQLCatalog
addSQLCatalog('erp5_mysql', '')
portal_catalog.default_sql_catalog_id = 'erp5_mysql'
# Add ERP5Form Tools # Add ERP5Form Tools
addTool = p.manage_addProduct['ERP5Form'].manage_addTool addTool = p.manage_addProduct['ERP5Form'].manage_addTool
...@@ -879,14 +882,12 @@ class ERP5Generator(PortalGenerator): ...@@ -879,14 +882,12 @@ class ERP5Generator(PortalGenerator):
addTool('ERP5 Synchronizations', None) addTool('ERP5 Synchronizations', None)
# Add Message Catalog # Add Message Catalog
#if 'Localizer' in p.objectIds():
#p._delObject('Localizer') # Why delete it, we should keep for ERP5/CPS
if not 'Localizer' in p.objectIds(): if not 'Localizer' in p.objectIds():
#p._delObject('Localizer') # Why delete it, we should keep for ERP5/CPS
addLocalizer = p.manage_addProduct['Localizer'].manage_addLocalizer addLocalizer = p.manage_addProduct['Localizer'].manage_addLocalizer
addLocalizer('', ('en',)) addLocalizer('', ('en',))
localizer = getToolByName(p, 'Localizer') localizer = getToolByName(p, 'Localizer')
addMessageCatalog = localizer.manage_addProduct['Localizer'].manage_addMessageCatalog addMessageCatalog = localizer.manage_addProduct['Localizer']\
.manage_addMessageCatalog
if 'erp5_ui' not in localizer.objectIds(): if 'erp5_ui' not in localizer.objectIds():
if 'default' in localizer.objectIds(): if 'default' in localizer.objectIds():
localizer.manage_delObjects('default') localizer.manage_delObjects('default')
......
portal_catalog/erp5_mysql
portal_preferences/default_site_preference portal_preferences/default_site_preference
\ No newline at end of file
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