[FIX] fields: a function field with fnct_search should be searchable

This commit is contained in:
Raphael Collet 2014-09-24 11:12:44 +02:00 committed by Olivier Dony
parent aa6af7608a
commit 1f15055de3
1 changed files with 5 additions and 1 deletions

View File

@ -557,7 +557,11 @@ class Field(object):
return False
def _description_searchable(self, env):
return self._description_store(env) or bool(self.search)
if self.store:
column = env[self.model_name]._columns.get(self.name)
return bool(getattr(column, 'store', True)) or \
bool(getattr(column, '_fnct_search', False))
return bool(self.search)
_description_manual = property(attrgetter('manual'))
_description_depends = property(attrgetter('depends'))