diff --git a/product/ERP5Form/ListBox.py b/product/ERP5Form/ListBox.py index bc4dd8a12bf58a7097832a287af2d2589f18f7bc..f09f0acb86d1b9047c9e6c1991a3e3a551f2d93c 100644 --- a/product/ERP5Form/ListBox.py +++ b/product/ERP5Form/ListBox.py @@ -2062,7 +2062,14 @@ class ListBoxHTMLRenderer(ListBoxRenderer): # 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.