[FIX] hack around double-search: prevent loading of defaults in search view from triggering a search

which requires manually requesting a facets repaint, as that hinges on the query's events

bzr revid: xmo@openerp.com-20120410072434-nsjb97cc32rxb9ju
This commit is contained in:
Xavier Morel 2012-04-10 09:24:34 +02:00
parent c06f170f83
commit dbc5bde43d
1 changed files with 4 additions and 1 deletions

View File

@ -427,7 +427,10 @@ openerp.web.SearchView = openerp.web.Widget.extend(/** @lends openerp.web.Search
return $.when(
this.setup_stuff_drawer(),
$.when.apply(null, _(this.inputs).invoke('facet_for_defaults', this.defaults))
.then(function () { self.vs.searchQuery.reset(_(arguments).compact()); }))
.then(function () {
self.vs.searchQuery.reset(_(arguments).compact(), {silent: true});
self.vs.searchBox.renderFacets();
}))
.then(function () { self.ready.resolve(); })
},
/**