[Erp5-report] r8610 - /erp5/trunk/products/ERP5Form/ListBox.py

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Jul 19 17:03:21 CEST 2006


Author: kevin
Date: Wed Jul 19 17:03:04 2006
New Revision: 8610

URL: http://svn.erp5.org?rev=8610&view=rev
Log:
A stupid patch to partially correct bug #389

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

Modified: erp5/trunk/products/ERP5Form/ListBox.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Form/ListBox.py?rev=8610&r1=8609&r2=8610&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Form/ListBox.py (original)
+++ erp5/trunk/products/ERP5Form/ListBox.py Wed Jul 19 17:03:04 2006
@@ -2062,7 +2062,14 @@
 
     # If a specific template is specified, use it.
     method_id = self.field.get_value('page_template')
-    if method_id:
+    if method_id not in (None, ''):
+      try:
+        return aq_base(getattr(self.getContext(), method_id)).__of__(context)
+      except AttributeError:
+        page_template = getattr( context.getPortalObject()
+                               , method_id
+                               )
+        return page_template.__of__(context)
       return aq_base(getattr(self.getContext(), method_id)).__of__(context)
 
     # Otherwise, use the default one.




More information about the Erp5-report mailing list