From 6083ed4b46dab046fe4e21bdb479afb7cd1d3216 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Tue, 22 Apr 2014 17:09:18 +0200 Subject: [PATCH] [FIX] web: abitility to do exact id matching with child_of operator for searchs on many2one fields bzr revid: dle@openerp.com-20140422150918-nxv2v4bcvi6u3v6g --- addons/web/static/src/js/search.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/addons/web/static/src/js/search.js b/addons/web/static/src/js/search.js index b82ad6504a9..1f616202c3f 100644 --- a/addons/web/static/src/js/search.js +++ b/addons/web/static/src/js/search.js @@ -1578,8 +1578,11 @@ instance.web.search.ManyToOneField = instance.web.search.CharField.extend({ return facetValue.get('label'); }, make_domain: function (name, operator, facetValue) { - if (operator === this.default_operator) { + switch(operator){ + case this.default_operator: return [[name, '=', facetValue.get('value')]]; + case 'child_of': + return [[name, 'child_of', facetValue.get('value')]]; } return this._super(name, operator, facetValue); },