Commit 8722b7bc authored by Sebastien Robin's avatar Sebastien Robin

moved sql methods into business template,so do not call addDefaultSqlMethods


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@6161 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 761da424
...@@ -755,7 +755,8 @@ class ERP5Generator(PortalGenerator): ...@@ -755,7 +755,8 @@ class ERP5Generator(PortalGenerator):
LOG('setupTools, create',0,kw) LOG('setupTools, create',0,kw)
id = str(id) id = str(id)
portal = self.klass(id=id) portal = self.klass(id=id)
if reindex==0: # Make sure reindex will not be called until business templates
# will be installed
setattr(portal,'isIndexable',0) setattr(portal,'isIndexable',0)
parent._setObject(id, portal) parent._setObject(id, portal)
# Return the fully wrapped object. # Return the fully wrapped object.
...@@ -868,9 +869,6 @@ class ERP5Generator(PortalGenerator): ...@@ -868,9 +869,6 @@ class ERP5Generator(PortalGenerator):
# Create default methods in Catalog XXX # 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:
# FIXME: addDefaultSQLMethods should be removed.
portal_catalog.addDefaultSQLMethods('erp5_mysql')
# Clear Catalog # Clear Catalog
portal_catalog.manage_catalogClear() portal_catalog.manage_catalogClear()
...@@ -968,6 +966,7 @@ class ERP5Generator(PortalGenerator): ...@@ -968,6 +966,7 @@ class ERP5Generator(PortalGenerator):
skins_tool = getToolByName(p, 'portal_skins', None) skins_tool = getToolByName(p, 'portal_skins', None)
if skins_tool is None: if skins_tool is None:
return return
setattr(p,'isIndexable',1)
portal_catalog = p.portal_catalog portal_catalog = p.portal_catalog
portal_catalog.manage_catalogClear() portal_catalog.manage_catalogClear()
skins_tool["erp5_core"].ERP5Site_reindexAll() skins_tool["erp5_core"].ERP5Site_reindexAll()
......
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