[FIX] OPW 590091 : not searchable functional fields aren't removed from advanced...
authorAnael Closson <acl@openerp.com>
Tue, 7 May 2013 09:27:34 +0000 (11:27 +0200)
committerAnael Closson <acl@openerp.com>
Tue, 7 May 2013 09:27:34 +0000 (11:27 +0200)
bzr revid: acl@openerp.com-20130507092734-zmmm0g5c1t8va1dl

addons/web/static/src/js/search.js

index 37f8bd8..13abda0 100644 (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 && (typeof field.store === 'undefined' || field.store || field.funct_search); })
             .sortBy(function(field) {return field.string;})
             .value();
         this.attrs = {_: _, fields: this.fields, selected: null};