[FIX] actions loading when action domain is 'false'

bzr revid: xmo@openerp.com-20110628075755-fefmksebrd7snyzj
This commit is contained in:
Xavier Morel
2011-06-28 09:57:55 +02:00
parent c10f4a7004
commit 88dcdc93c4
+5 -1
View File
@@ -127,9 +127,13 @@ openerp.base.ViewManager = openerp.base.Controller.extend({
}
if (view_type === 'list' && this.flags.search_view === false && this.action && this.action['auto_search']) {
// In case the search view is not instanciated: manually call ListView#search
var domains = !_(self.action.domain).isEmpty()
? [self.action.domain] : [],
contexts = !_(self.action.context).isEmpty()
? [self.action.context] : [];
controller.on_loaded.add({
callback: function () {
controller.do_search([self.action.domain], [self.action.context], []);
controller.do_search(domains, contexts, []);
},
position: 'last',
unique: true