if search view contains only synchronously-initialized widgets, 'self.ready.resolve()' is called before 'self' is set since 'self' is set *after* the $.when call

move 'self'-setting to the top of the function, just in case

bzr revid: xmo@openerp.com-20110725091049-q5lt2sgbfawphiuh
This commit is contained in:
Xavier Morel 2011-07-25 11:10:49 +02:00
parent d48e423d98
commit e1f9b0c600
1 changed files with 4 additions and 4 deletions

View File

@ -110,9 +110,10 @@ openerp.base.SearchView = openerp.base.Controller.extend({
}
},
on_loaded: function(data) {
var lines = this.make_widgets(
data.fields_view['arch'].children,
data.fields_view.fields);
var self = this,
lines = this.make_widgets(
data.fields_view['arch'].children,
data.fields_view.fields);
// for extended search view
var ext = new openerp.base.search.ExtendedSearch(this, this.model);
@ -145,7 +146,6 @@ openerp.base.SearchView = openerp.base.Controller.extend({
});
// filters management
var self = this;
return this.rpc('/base/searchview/get_filters', {
model: this.dataset.model
}).then(function(result) {