Commit 662aa818 authored by Ayush Tiwari's avatar Ayush Tiwari

erp5_catalog: Add title for catalog tool and filter meta_types only for CatalogTool object

parent 2ed361fc
...@@ -311,6 +311,7 @@ class CatalogTool (ZCatalog, CMFCoreCatalogTool, BaseTool): ...@@ -311,6 +311,7 @@ class CatalogTool (ZCatalog, CMFCoreCatalogTool, BaseTool):
It is based on ZSQLCatalog It is based on ZSQLCatalog
""" """
id = 'portal_catalog' id = 'portal_catalog'
title = 'Catalog Tool'
meta_type = 'Catalog Tool' meta_type = 'Catalog Tool'
portal_type = 'Catalog Tool' portal_type = 'Catalog Tool'
allowed_types = ('Catalog',) allowed_types = ('Catalog',)
...@@ -358,9 +359,9 @@ class CatalogTool (ZCatalog, CMFCoreCatalogTool, BaseTool): ...@@ -358,9 +359,9 @@ class CatalogTool (ZCatalog, CMFCoreCatalogTool, BaseTool):
# Filter content (ZMI)) # Filter content (ZMI))
def filtered_meta_types(self, user=None): def filtered_meta_types(self, user=None):
# Filters the list of available meta types. # Filters the list of available meta types for CatalogTool
meta_types = [] meta_types = []
for meta_type in self.all_meta_types(): for meta_type in CatalogTool.inheritedAttribute('filtered_meta_types')(self):
if meta_type['name'] in self.allowed_types: if meta_type['name'] in self.allowed_types:
meta_types.append(meta_type) meta_types.append(meta_type)
return meta_types return meta_types
......
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