[FIX] race condition introduced in nicolas.vanhoren@openerp.com-20110722154419-9g31mwfsuv67rjz3
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:
parent
d48e423d98
commit
e1f9b0c600
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue