[Erp5-report] r9988 - /erp5/trunk/products/ERP5Type/Base.py

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Sep 15 13:32:21 CEST 2006


Author: jp
Date: Fri Sep 15 13:32:19 2006
New Revision: 9988

URL: http://svn.erp5.org?rev=9988&view=rev
Log:
Added support for historical

Modified:
    erp5/trunk/products/ERP5Type/Base.py

Modified: erp5/trunk/products/ERP5Type/Base.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/Base.py?rev=9988&r1=9987&r2=9988&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/Base.py (original)
+++ erp5/trunk/products/ERP5Type/Base.py Fri Sep 15 13:32:19 2006
@@ -32,6 +32,8 @@
 from AccessControl import ClassSecurityInfo
 from AccessControl.Permission import pname, Permission
 from Acquisition import aq_base, aq_inner, aq_acquire, aq_chain
+
+from OFS.History import Historical
 
 from Products.CMFCore.PortalContent import PortalContent
 from Products.CMFCore.Expression import Expression
@@ -326,8 +328,7 @@
                     method = WorkflowMethod(method, method_id)
                     setattr(prop_holder, method_id, method)
 
-
-class Base( CopyContainer, PortalContent, ActiveObject, ERP5PropertyManager ):
+class Base( CopyContainer, PortalContent, ActiveObject, Historical, ERP5PropertyManager ):
   """
     This is the base class for all ERP5 Zope objects.
     It defines object attributes which are necessary to implement
@@ -1208,16 +1209,16 @@
       objectlist.append(objectlist[-1][element])
     return '/' + join([object.getTitle() for object in objectlist[1:]], '/')
 
+  security.declareProtected(Permissions.AccessContentsInformation, 'getUrl')
+  def getUrl(self, REQUEST=None):
+    """
+      Returns the absolute path of an object
+    """
+    return join(self.getPhysicalPath(),'/')
+
+  # Old name - for compatibility
   security.declareProtected(Permissions.AccessContentsInformation, 'getPath')
-  def getPath(self, REQUEST=None):
-    """
-      Returns the absolute path of an object
-    """
-    return join(self.getPhysicalPath(),'/')
-
-  # This should be the new name
-  security.declareProtected(Permissions.AccessContentsInformation, 'getUrl')
-  getUrl = getPath
+  getPath = getUrl
 
   security.declareProtected(Permissions.AccessContentsInformation, 'getRelativeUrl')
   def getRelativeUrl(self):




More information about the Erp5-report mailing list