[imp] clear search filter when using an advanced filter

bzr revid: nicolas.vanhoren@openerp.com-20120106150826-fzhg02asqf8o828w
This commit is contained in:
niv-openerp 2012-01-06 16:08:26 +01:00
parent e590cd35ca
commit 7a9ed7b281
1 changed files with 4 additions and 2 deletions

View File

@ -255,7 +255,9 @@ openerp.web.SearchView = openerp.web.Widget.extend(/** @lends openerp.web.Search
val = val.slice(4);
val = parseInt(val, 10);
var filter = this.managed_filters[val];
this.on_search([filter.domain], [filter.context], []);
this.do_clear().then(_.bind(function() {
this.on_search([filter.domain], [filter.context], []);
}, this));
} else {
select.val('');
}
@ -417,7 +419,7 @@ openerp.web.SearchView = openerp.web.Widget.extend(/** @lends openerp.web.Search
input.datewidget.set_value(false);
}
});
setTimeout(this.on_clear, 0);
return $.async_when().pipe(this.on_clear);
},
/**
* Triggered when the search view gets cleared