Commit b59080cc authored by Ayush Tiwari's avatar Ayush Tiwari

erp5_catalog: Inherit from Folder in Products.ERP5Type instead of OFS.

Using CopyContainer to use functions from inherited class also and maintain
consistency between them.
parent 18d4ea18
...@@ -20,7 +20,7 @@ import OFS.History ...@@ -20,7 +20,7 @@ import OFS.History
from App.class_init import default__class_init__ as InitializeClass from App.class_init import default__class_init__ as InitializeClass
from App.special_dtml import DTMLFile from App.special_dtml import DTMLFile
from thread import allocate_lock, get_ident from thread import allocate_lock, get_ident
from OFS.Folder import Folder from Products.ERP5Type.Core.Folder import Folder
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from AccessControl.Permissions import access_contents_information, \ from AccessControl.Permissions import access_contents_information, \
import_export_objects, manage_zcatalog_entries import_export_objects, manage_zcatalog_entries
...@@ -36,6 +36,7 @@ from zLOG import LOG, WARNING, INFO, TRACE, ERROR ...@@ -36,6 +36,7 @@ from zLOG import LOG, WARNING, INFO, TRACE, ERROR
from ZODB.POSException import ConflictError from ZODB.POSException import ConflictError
from Products.CMFCore import permissions from Products.CMFCore import permissions
from Products.PythonScripts.Utility import allow_class from Products.PythonScripts.Utility import allow_class
from Products.ERP5Type.CopySupport import CopyContainer
import time import time
import sys import sys
...@@ -289,11 +290,12 @@ ContainerAssertions[LazyIndexationParameterList] = 1 ...@@ -289,11 +290,12 @@ ContainerAssertions[LazyIndexationParameterList] = 1
related_key_warned_column_set = set() related_key_warned_column_set = set()
class Catalog(Folder, class Catalog(CopyContainer,
Persistent, Persistent,
Acquisition.Implicit, Acquisition.Implicit,
ActiveObject, ActiveObject,
OFS.History.Historical): OFS.History.Historical,
Folder):
""" An Object Catalog """ An Object Catalog
An Object Catalog maintains a table of object metadata, and a An Object Catalog maintains a table of object metadata, and a
...@@ -317,6 +319,7 @@ class Catalog(Folder, ...@@ -317,6 +319,7 @@ class Catalog(Folder,
or search_mode_Table_Key or search_mode_Table_Key
""" """
portal_type = 'Catalog'
implements(ISearchKeyCatalog) implements(ISearchKeyCatalog)
......
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