[Erp5-report] r12074 - /erp5/trunk/products/ERP5Form/MultiRelationField.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Sat Jan 13 19:03:16 CET 2007
Author: jp
Date: Sat Jan 13 19:03:05 2007
New Revision: 12074
URL: http://svn.erp5.org?rev=12074&view=rev
Log:
Use absolute_url instead of getPath. Add an empty object so that the user can select none of the found items.
Modified:
erp5/trunk/products/ERP5Form/MultiRelationField.py
Modified: erp5/trunk/products/ERP5Form/MultiRelationField.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Form/MultiRelationField.py?rev=12074&r1=12073&r2=12074&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Form/MultiRelationField.py (original)
+++ erp5/trunk/products/ERP5Form/MultiRelationField.py Sat Jan 13 19:03:05 2007
@@ -306,15 +306,16 @@
portal_url = getToolByName(here, 'portal_url')
portal_url_string = portal_url()
portal_object = portal_url.getPortalObject()
+ portal_selections_url_string = here.portal_selections.absolute_url_path()
if sub_index is None:
sub_index_string = ''
else:
sub_index_string = '_%s' % sub_index
return ' <input type="image" ' \
'src="%s/images/exec16.png" value="update..." ' \
- 'name="%s/portal_selections/viewSearchRelatedDocumentDialog%s%s' \
+ 'name="%s/viewSearchRelatedDocumentDialog%s%s' \
':method"/>' % \
- (portal_url_string, portal_object.getPath(),
+ (portal_url_string, portal_selections_url_string,
relation_index, sub_index_string)
def render_relation_link(self, field, value, REQUEST):
@@ -728,6 +729,8 @@
menu_item_list.extend([(
x.getObject().getProperty(catalog_index),
x.uid) for x in relation_list])
+ # Add blank line
+ menu_item_list.append(('', ''))
REQUEST.set(relation_item_id, menu_item_list)
raising_error_needed = 1
raising_error_value = 'relation_result_ambiguous'
More information about the Erp5-report
mailing list