[Erp5-report] r12572 - /erp5/trunk/products/ERP5Form/ListBox.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Feb 7 16:02:32 CET 2007
Author: jp
Date: Wed Feb 7 16:02:28 2007
New Revision: 12572
URL: http://svn.erp5.org?rev=12572&view=rev
Log:
Better support of URLs and extension for rendering
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=12572&r1=12571&r2=12572&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Form/ListBox.py (original)
+++ erp5/trunk/products/ERP5Form/ListBox.py Wed Feb 7 16:02:28 2007
@@ -817,7 +817,7 @@
def getListActionUrl(self):
"""Return the URL of the list action.
"""
- list_action_part_list = [self.getContext().getUrl(), '/', self.field.get_value('list_action')]
+ list_action_part_list = [self.getContext().absolute_url(), '/', self.field.get_value('list_action')]
if '?' in list_action_part_list[-1]:
list_action_part_list.append('&reset=1')
else:
@@ -2149,8 +2149,11 @@
except AttributeError:
return getattr(context.getPortalObject(), method_id).__of__(context)
return aq_base(getattr(self.getContext(), method_id)).__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)
+ # Try to get a page template from acquisition context then portal object
+ # and fallback on default page template.
+ return getattr(self.getContext(), 'ListBox_asHTML',
+ 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