Commit 6a9a37ab authored by Ayush Tiwari's avatar Ayush Tiwari

erp5_catalog: Override getCatalogMethodIds cause it uses global variable in SQLCatalog.Catalog

parent 78270d0f
...@@ -57,6 +57,8 @@ class ERP5Catalog(Folder, Catalog): ...@@ -57,6 +57,8 @@ class ERP5Catalog(Folder, Catalog):
icon = None icon = None
# Activate isRADContent cause we need to generate accessors and default values # Activate isRADContent cause we need to generate accessors and default values
isRADContent = 1 isRADContent = 1
global valid_method_meta_type_list_new
valid_method_meta_type_list_new = ('ERP5 SQL Method', 'ERP5 Python Script')
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
...@@ -102,6 +104,15 @@ class ERP5Catalog(Folder, Catalog): ...@@ -102,6 +104,15 @@ class ERP5Catalog(Folder, Catalog):
meta_types.append(meta_type) meta_types.append(meta_type)
return meta_types return meta_types
security.declarePrivate('getCatalogMethodIds')
def getCatalogMethodIds(self,
valid_method_meta_type_list=valid_method_meta_type_list_new):
"""Find ERP5 SQL methods in the current folder and above
This function return a list of ids.
"""
return super(ERP5Catalog, self).getCatalogMethodIds(
valid_method_meta_type_list=valid_method_meta_type_list_new)
InitializeClass(ERP5Catalog) InitializeClass(ERP5Catalog)
class ERP5CatalogError(CatalogError): pass class ERP5CatalogError(CatalogError): pass
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