Commit cb7ac2f1 authored by Ayush Tiwari's avatar Ayush Tiwari

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

parent e82f3f0e
......@@ -1928,9 +1928,9 @@ class ERP5Generator(PortalGenerator):
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)
# addTool = p.manage_addProduct['ERP5Catalog'].manage_addTool
# if not p.hasObject('portal_catalog'):
# addTool('ERP5 Catalog', None)
# Add Default SQL connection
if p.erp5_sql_connection_type == 'Z MySQL Database Connection':
......@@ -2210,6 +2210,9 @@ class ERP5Generator(PortalGenerator):
self.setupDefaultSkins(p)
assert not p.hasObject('portal_activities')
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
p.portal_activities.manageClearActivities()
# 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