[Erp5-report] r18868 - /erp5/trunk/products/ERP5Form/ListBox.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Jan 25 22:16:17 CET 2008
Author: jp
Date: Fri Jan 25 22:16:16 2008
New Revision: 18868
URL: http://svn.erp5.org?rev=18868&view=rev
Log:
Support for real URLs in list action
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=18868&r1=18867&r2=18868&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Form/ListBox.py (original)
+++ erp5/trunk/products/ERP5Form/ListBox.py Fri Jan 25 22:16:16 2008
@@ -791,7 +791,13 @@
def getListActionUrl(self):
"""Return the URL of the list action.
"""
- list_action_part_list = [self.getContext().absolute_url(), '/', self.field.get_value('list_action')]
+ list_action = self.field.get_value('list_action')
+ if '/' in list_action:
+ # This is a 'real' URL
+ return list_action
+ else:
+ # This is only a method name. Let us build the URL
+ list_action_part_list = [self.getContext().absolute_url(), '/', list_action]
if '?' in list_action_part_list[-1]:
list_action_part_list.append('&reset=1')
else:
More information about the Erp5-report
mailing list