[Erp5-report] r10350 - /erp5/trunk/products/ERP5Form/PreferenceTool.py

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Sep 27 11:49:54 CEST 2006


Author: jerome
Date: Wed Sep 27 11:49:52 2006
New Revision: 10350

URL: http://svn.erp5.org?rev=10350&view=rev
Log:
as the preference tool is also a Folder, this method is called by page templates to get the list of document templates for self.


Modified:
    erp5/trunk/products/ERP5Form/PreferenceTool.py

Modified: erp5/trunk/products/ERP5Form/PreferenceTool.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Form/PreferenceTool.py?rev=10350&r1=10349&r2=10350&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Form/PreferenceTool.py (original)
+++ erp5/trunk/products/ERP5Form/PreferenceTool.py Wed Sep 27 11:49:52 2006
@@ -190,6 +190,11 @@
     """ returns all document templates that are in acceptable Preferences
         based on different criteria such as folder, portal_type, etc.
     """
+    if folder is None:
+      # as the preference tool is also a Folder, this method is called by
+      # page templates to get the list of document templates for self.   
+      folder = self
+
     # We must set the user_id as a parameter to make sure each
     # user can get a different cache
     def _getDocumentTemplateList(user_id,portal_type=None):




More information about the Erp5-report mailing list