[Erp5-report] r40364 aurel - /erp5/trunk/products/ERP5Form/MultiRelationField.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Nov 18 14:09:34 CET 2010
Author: aurel
Date: Thu Nov 18 14:09:33 2010
New Revision: 40364
URL: http://svn.erp5.org?rev=40364&view=rev
Log:
call on the editor of multi-relation string field must set the
'default_text' on the default field id instead of the uid list, this
prevent from displaying uid to the user if any other field of the form
is not validated
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=40364&r1=40363&r2=40364&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Form/MultiRelationField.py [utf8] (original)
+++ erp5/trunk/products/ERP5Form/MultiRelationField.py [utf8] Thu Nov 18 14:09:33 2010
@@ -405,7 +405,7 @@ class MultiRelationEditor:
for value, uid, display_text, relation_key, item_key in \
self.relation_editor_list:
- value_list.append(value)
+ value_list.append(display_text)
if uid is not None:
# Decorate the request so that we can display
# the select item in a popup
@@ -600,7 +600,7 @@ class MultiRelationStringFieldValidator(
####################################
# User validate the form
####################################
- if need_to_revalidate == 1:
+ if need_to_revalidate == 1:
# else:
####################################
# Check the default field
@@ -771,7 +771,7 @@ class MultiRelationStringFieldValidator(
#####################################
# Validate MultiRelation field
- #####################################
+ #####################################
if raising_error_needed:
# Raise error
self.raise_error(raising_error_value, field)
More information about the Erp5-report
mailing list