[Erp5-report] r42992 romain - /erp5/trunk/products/ERP5Form/Extensions/

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Feb 3 16:16:57 CET 2011


Author: romain
Date: Thu Feb  3 16:16:56 2011
New Revision: 42992

URL: http://svn.erp5.org?rev=42992&view=rev
Log:
Do not try to add a full text search if it was already provided by the listbox.

Modified:
    erp5/trunk/products/ERP5Form/Extensions/Folder_viewSearchDialog.py

Modified: erp5/trunk/products/ERP5Form/Extensions/Folder_viewSearchDialog.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Form/Extensions/Folder_viewSearchDialog.py?rev=42992&r1=42991&r2=42992&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Form/Extensions/Folder_viewSearchDialog.py [utf8] (original)
+++ erp5/trunk/products/ERP5Form/Extensions/Folder_viewSearchDialog.py [utf8] Thu Feb  3 16:16:56 2011
@@ -233,8 +233,11 @@ def getSearchDialog(self, REQUEST=None):
   search_list = ListBoxListRenderer(
                       listbox.widget, listbox, request).getSearchColumnIdSet()
 
+  full_text_search_added = False
   for column_id, column_title in column_list:
     # is it a base category ?
+    if column_id == "SearchableText":
+      full_text_search_added = True
     short_column_id = column_id
     # strip the usuale default_ and _title that are on standard fields.
     if short_column_id.endswith('_translated_title'):
@@ -340,7 +343,8 @@ def getSearchDialog(self, REQUEST=None):
             ['title', 'items', 'default'])
 
 
-  addFullTextStringField('SearchableText', 'Full Text Search')
+  if not full_text_search_added:
+    addFullTextStringField('SearchableText', 'Full Text Search')
 
   # Order fields
   default_group = temp_form.group_list[0]



More information about the Erp5-report mailing list