Commit 1c27b5e1 authored by Ayush Tiwari's avatar Ayush Tiwari

erp5_catalog: Generate Portal Catalog as an ERP5Tool in ERP5 Site.

No need to add Catalog Tool via the earlier manage_addProduct as it is an ERP5 object now
parent 9a37c45b
...@@ -1935,11 +1935,6 @@ class ERP5Generator(PortalGenerator): ...@@ -1935,11 +1935,6 @@ class ERP5Generator(PortalGenerator):
addERP5Tool(p, 'portal_caches', 'Cache Tool') addERP5Tool(p, 'portal_caches', 'Cache Tool')
addERP5Tool(p, 'portal_memcached', 'Memcached Tool') addERP5Tool(p, 'portal_memcached', 'Memcached Tool')
# Add ERP5 SQL Catalog Tool
addTool = p.manage_addProduct['ERP5Catalog'].manage_addTool
if not p.hasObject('portal_catalog'):
addTool('ERP5 Catalog', None)
# Add Default SQL connection # Add Default SQL connection
if p.erp5_sql_connection_type == 'Z MySQL Database Connection': if p.erp5_sql_connection_type == 'Z MySQL Database Connection':
if not p.hasObject('erp5_sql_connection'): if not p.hasObject('erp5_sql_connection'):
...@@ -2218,6 +2213,11 @@ class ERP5Generator(PortalGenerator): ...@@ -2218,6 +2213,11 @@ class ERP5Generator(PortalGenerator):
self.setupDefaultSkins(p) self.setupDefaultSkins(p)
assert not p.hasObject('portal_activities') assert not p.hasObject('portal_activities')
addERP5Tool(p, 'portal_activities', 'Activity Tool') addERP5Tool(p, 'portal_activities', 'Activity Tool')
# CatalogTool has been included inside ERP5. So, prefer using addERP5Tool
# instead of using addTool on Catalog Tool object.
addERP5Tool(p, 'portal_catalog', 'Catalog Tool')
# Initialize Activities # Initialize Activities
p.portal_activities.manageClearActivities() p.portal_activities.manageClearActivities()
# Reindex already existing tools # Reindex already existing tools
......
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