[Erp5-report] r22632 - /erp5/trunk/products/ERP5Catalog/CatalogTool.py

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Jul 23 18:11:56 CEST 2008


Author: vincent
Date: Wed Jul 23 18:11:55 2008
New Revision: 22632

URL: http://svn.erp5.org?rev=22632&view=rev
Log:
Use a less intrusive workaround (see commit 21271).

Modified:
    erp5/trunk/products/ERP5Catalog/CatalogTool.py

Modified: erp5/trunk/products/ERP5Catalog/CatalogTool.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Catalog/CatalogTool.py?rev=22632&r1=22631&r2=22632&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Catalog/CatalogTool.py (original)
+++ erp5/trunk/products/ERP5Catalog/CatalogTool.py Wed Jul 23 18:11:55 2008
@@ -37,7 +37,7 @@
 from Products.CMFCore.utils import UniqueObject, _checkPermission, _getAuthenticatedUser, getToolByName
 from Products.CMFCore.utils import _mergedLocalRoles
 from Globals import InitializeClass, DTMLFile, package_home
-from Acquisition import aq_base, aq_inner, aq_parent
+from Acquisition import aq_base, aq_inner, aq_parent, ImplicitAcquisitionWrapper
 from DateTime.DateTime import DateTime
 from Products.CMFActivity.ActiveObject import ActiveObject
 from Products.ERP5Type.TransactionalVariable import getTransactionalVariable
@@ -81,7 +81,7 @@
   pass
 
 from Persistence import Persistent
-from Acquisition import Implicit, Explicit
+from Acquisition import Implicit
 
 def getSecurityProduct(acl_users):
   """returns the security used by the user folder passed.
@@ -93,15 +93,7 @@
     return SECURITY_USING_NUX_USER_GROUPS
 
 
-class IndexableObjectWrapper(CMFCoreIndexableObjectWrapper, Explicit):
-
-
-    def __getattr__(self, name):
-        vars = self.__vars
-        if vars.has_key(name):
-            return vars[name]
-        ob = aq_inner(self.__ob)
-        return getattr(ob, name)
+class IndexableObjectWrapper(CMFCoreIndexableObjectWrapper):
 
     def __setattr__(self, name, value):
       # We need to update the uid during the cataloging process
@@ -754,7 +746,8 @@
         if predicate_property_dict is not None:
           vars['predicate_property_dict'] = predicate_property_dict
         vars['security_uid'] = security_uid
-        return w.__of__(object.aq_parent)
+
+        return ImplicitAcquisitionWrapper(w, aq_parent(document_object))
 
     security.declarePrivate('reindexObject')
     def reindexObject(self, object, idxs=None, sql_catalog_id=None,**kw):




More information about the Erp5-report mailing list