summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
authorDenis Ledoux <dle@openerp.com>2014-04-22 17:09:18 +0200
committerDenis Ledoux <dle@openerp.com>2014-04-22 17:09:18 +0200
commit6083ed4b46dab046fe4e21bdb479afb7cd1d3216 (patch)
treeed77bde6881fbad094a42161054dced9e00c0b45 /addons/web/static/src
parentc6189d91a0f3a313393e48e2f3dc86d34c84542e (diff)
[FIX] web: abitility to do exact id matching with child_of operator for searchs on many2one fields
bzr revid: dle@openerp.com-20140422150918-nxv2v4bcvi6u3v6g
Diffstat (limited to 'addons/web/static/src')
-rw-r--r--addons/web/static/src/js/search.js5
1 files changed, 4 insertions, 1 deletions
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);
},