[Erp5-report] r44305 jerome - /erp5/trunk/products/ERP5Form/MultiRelationField.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Mar 15 16:26:12 CET 2011
Author: jerome
Date: Tue Mar 15 16:26:12 2011
New Revision: 44305
URL: http://svn.erp5.org?rev=44305&view=rev
Log:
this code is also used for single relation field, where value is a string
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=44305&r1=44304&r2=44305&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Form/MultiRelationField.py [utf8] (original)
+++ erp5/trunk/products/ERP5Form/MultiRelationField.py [utf8] Tue Mar 15 16:26:12 2011
@@ -335,6 +335,8 @@ class MultiRelationStringFieldWidget(Wid
kw[k] = v
accessor_name = 'get%sValueList' % ''.join([part.capitalize() for part in base_category.split('_')])
jump_reference_list = getattr(here, accessor_name)(portal_type=portal_type, filter=kw)
+ if not isinstance(value, (list, tuple)):
+ value = value,
for jump_reference, display_value in zip(jump_reference_list, value):
string_list.append('<a href="%s">%s</a>' % \
(jump_reference.absolute_url(),
More information about the Erp5-report
mailing list