[FIX] exclude non-searchable function fields from the advanced search's list

bzr revid: xmo@openerp.com-20130516110949-o79aw68izo8poivu
This commit is contained in:
Xavier Morel
2013-05-16 13:09:49 +02:00
+1 -1
View File
@@ -1899,7 +1899,7 @@ instance.web.search.ExtendedSearchProposition = instance.web.Widget.extend(/** @
this._super(parent);
this.fields = _(fields).chain()
.map(function(val, key) { return _.extend({}, val, {'name': key}); })
.filter(function (field) { return !field.deprecated; })
.filter(function (field) { return !field.deprecated && (field.store === void 0 || field.store || field.fnct_search); })
.sortBy(function(field) {return field.string;})
.value();
this.attrs = {_: _, fields: this.fields, selected: null};