[Erp5-report] r13323 - /erp5/trunk/products/ERP5/Document/WebSection.py

nobody at svn.erp5.org nobody at svn.erp5.org
Mon Mar 12 09:26:36 CET 2007


Author: jp
Date: Mon Mar 12 09:26:35 2007
New Revision: 13323

URL: http://svn.erp5.org?rev=13323&view=rev
Log:
Extended API of getDocumentValue so that filtering is possible.

Modified:
    erp5/trunk/products/ERP5/Document/WebSection.py

Modified: erp5/trunk/products/ERP5/Document/WebSection.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/WebSection.py?rev=13323&r1=13322&r2=13323&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/WebSection.py (original)
+++ erp5/trunk/products/ERP5/Document/WebSection.py Mon Mar 12 09:26:35 2007
@@ -264,7 +264,7 @@
 
     # WebSection API
     security.declareProtected(Permissions.View, 'getDocumentValue')
-    def getDocumentValue(self, name=None, portal=None):
+    def getDocumentValue(self, name=None, portal=None, **kw):
       """
         Return the default document with the given
         name. The name parameter may represent anything
@@ -274,6 +274,9 @@
         If name is not provided, the method defaults
         to returning the default document by calling
         getDefaultDocumentValue.
+
+        kw parameters can be useful to filter content
+        (ex. force a given validation state)
 
         This method must be implemented through a
         portal type dependent script:
@@ -297,7 +300,7 @@
       if cache is not None:
         if not cache.has_key(key): cache[key] = method
 
-      return method(name, portal=portal)
+      return method(name, portal=portal, **kw)
 
     security.declareProtected(Permissions.View, 'getDefaultDocumentValue')
     def getDefaultDocumentValue(self):




More information about the Erp5-report mailing list