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

nobody at svn.erp5.org nobody at svn.erp5.org
Sun Nov 5 08:55:52 CET 2006


Author: bartek
Date: Sun Nov  5 08:55:50 2006
New Revision: 11092

URL: http://svn.erp5.org?rev=11092&view=rev
Log:
Moved getWebSectionValue to Base until issue related to acquisition is understood

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=11092&r1=11091&r2=11092&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/Base.py (original)
+++ erp5/trunk/products/ERP5Type/Base.py Sun Nov  5 08:55:50 2006
@@ -2706,6 +2706,20 @@
     dochelper.setDynamicPropertyList(dynamic_property_list)
     return dochelper
 
+  security.declareProtected(Permissions.AccessContentsInformation, 'getWebSectionValue')
+  def getWebSectionValue(self):
+    """
+      Returns the current web section (ie. self) though parent acquisition
+      This method has been moved temporatily from WebSection to Base
+      until we understand the bug / issue in acquisition
+    """
+    section = self
+    portal = self.getPortalObject()
+    while section.getPortalType() not in ('Web Site', 'Web Section', ) and\
+          section is not portal:
+      section = section.aq_parent
+    return section
+
 InitializeClass(Base)
 
 class TempBase(Base):




More information about the Erp5-report mailing list