[gen] Bugfix: automatic search screens contained SearchableText twice.

This commit is contained in:
Gaetan Delannay 2015-02-26 10:03:29 +01:00
parent 6e03682b99
commit 0c706c695e

View file

@ -252,8 +252,12 @@ class ToolMixin(BaseMixin):
# Gather all the indexed fields on this class
fieldNames = [f.name for f in self.getAllAppyTypes(className) \
if f.indexed]
fieldNames.insert(0, 'SearchableText')
# Put SearchableText in front of the list and ensure "title"
# is not there
if 'title' in fieldNames: fieldNames.remove('title')
st = 'SearchableText'
if st in fieldNames: fieldNames.remove(st)
fieldNames.insert(0, st)
nbOfColumns = getattr(klass, 'numberOfSearchColumns', 3)
for name in fieldNames:
field = self.getAppyType(name, className=className)