[FIX] web: abitility to do exact id matching with child_of operator for searchs on many2one fields

bzr revid: dle@openerp.com-20140422150918-nxv2v4bcvi6u3v6g
This commit is contained in:
Denis Ledoux 2014-04-22 17:09:18 +02:00
parent c6189d91a0
commit 6083ed4b46
1 changed files with 4 additions and 1 deletions

View File

@ -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);
},