From 663173129593f50567a0582890ab6d2a95b5e6fe Mon Sep 17 00:00:00 2001 From: Vincent Pelletier <vincent@nexedi.com> Date: Tue, 12 Dec 2006 14:46:12 +0000 Subject: [PATCH] Add automatic lookup for custom ListBox rendering page template. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@11694 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5Form/ListBox.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/product/ERP5Form/ListBox.py b/product/ERP5Form/ListBox.py index 6995955911..d392e66c32 100644 --- a/product/ERP5Form/ListBox.py +++ b/product/ERP5Form/ListBox.py @@ -2100,9 +2100,8 @@ class ListBoxHTMLRenderer(ListBoxRenderer): 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. -- 2.30.9