[FIX] web: abitility to do exact id matching with child_of operator for searchs on...
authorDenis Ledoux <dle@openerp.com>
Tue, 22 Apr 2014 15:09:18 +0000 (17:09 +0200)
committerDenis Ledoux <dle@openerp.com>
Tue, 22 Apr 2014 15:09:18 +0000 (17:09 +0200)
bzr revid: dle@openerp.com-20140422150918-nxv2v4bcvi6u3v6g

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

index b82ad65..1f61620 100644 (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);
     },