[Erp5-report] r41885 nicolas - /erp5/trunk/products/ERP5Form/ListBox.py

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Dec 30 17:22:39 CET 2010


Author: nicolas
Date: Thu Dec 30 17:22:39 2010
New Revision: 41885

URL: http://svn.erp5.org?rev=41885&view=rev
Log:
Do not try to validate field's listbox_editable_column if they are not enabled

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=41885&r1=41884&r2=41885&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Form/ListBox.py [utf8] (original)
+++ erp5/trunk/products/ERP5Form/ListBox.py [utf8] Thu Dec 30 17:22:39 2010
@@ -2834,8 +2834,9 @@ class ListBoxValidator(Validator.Validat
               editable_field = editable_field_dict.get(alias)
               if editable_field is not None:
                 REQUEST.set('cell', o)
-                if editable_field.get_value('editable', REQUEST=REQUEST) \
-                                              and field.need_validate(REQUEST):
+                editable = editable_field.get_value('editable', REQUEST=REQUEST)
+                enabled = editable_field.get_value('enabled', REQUEST=REQUEST)
+                if editable and enabled and field.need_validate(REQUEST):
                   error_result_key = '%s_%s' % (editable_field.id, o.uid)
                   key = 'field_' + error_result_key
                   try:



More information about the Erp5-report mailing list