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

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Dec 12 15:46:14 CET 2006


Author: vincent
Date: Tue Dec 12 15:46:12 2006
New Revision: 11694

URL: http://svn.erp5.org?rev=11694&view=rev
Log:
Add automatic lookup for custom ListBox rendering page template.

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=11694&r1=11693&r2=11694&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Form/ListBox.py (original)
+++ erp5/trunk/products/ERP5Form/ListBox.py Tue Dec 12 15:46:12 2006
@@ -2100,9 +2100,8 @@
       except AttributeError:
         return getattr(context.getPortalObject(), method_id).__of__(context)
       return aq_base(getattr(self.getContext(), method_id)).__of__(context)
-
-    # Otherwise, use the default one.
-    return context.asHTML.__of__(context)
+    # Try to get a page template from acquisition and fallback on default page template.
+    return getattr(context.getPortalObject(), 'ListBox_asHTML', context.asHTML).__of__(context)
 
   def render(self, **kw):
     """Render the data in HTML.




More information about the Erp5-report mailing list