[REV] xmo@openerp.com-20110824131606-yokgoe3dz9ltaz2l, has nothing to do with the issue and does not actually fix it (just fudges some timing so it happens slightly less often)
bzr revid: xmo@openerp.com-20110825081833-a1vbcdm59mrzf2d0
This commit is contained in:
parent
c8bb3c1ea5
commit
de955d0983
|
@ -120,7 +120,7 @@ openerp.base.ListView = openerp.base.View.extend( /** @lends openerp.base.ListVi
|
|||
*/
|
||||
start: function() {
|
||||
this.$element.addClass('oe-listview');
|
||||
return this.reload_view();
|
||||
return this.reload_view(null, null, true);
|
||||
},
|
||||
/**
|
||||
* Called after loading the list view's description, sets up such things
|
||||
|
@ -362,22 +362,22 @@ openerp.base.ListView = openerp.base.View.extend( /** @lends openerp.base.ListVi
|
|||
* @param {Boolean} [grouped] Should the list be displayed grouped
|
||||
* @param {Object} [context] context to send the server while loading the view
|
||||
*/
|
||||
reload_view: function (grouped, context) {
|
||||
var self = this, d = $.Deferred();
|
||||
d.then(function (field_view_get) {
|
||||
reload_view: function (grouped, context, initial) {
|
||||
var self = this;
|
||||
var callback = function (field_view_get) {
|
||||
console.log('loaded', initial ? 'initial' : 'subsequent');
|
||||
self.on_loaded(field_view_get, grouped);
|
||||
});
|
||||
};
|
||||
if (this.embedded_view) {
|
||||
d.resolve({fields_view: this.embedded_view});
|
||||
return $.Deferred().then(callback).resolve({fields_view: this.embedded_view});
|
||||
} else {
|
||||
this.rpc('/base/listview/load', {
|
||||
return this.rpc('/base/listview/load', {
|
||||
model: this.model,
|
||||
view_id: this.view_id,
|
||||
context: this.dataset.get_context(context),
|
||||
toolbar: this.options.sidebar
|
||||
}, function () { d.resolve.apply(this, arguments); });
|
||||
}, callback);
|
||||
}
|
||||
return d.promise();
|
||||
},
|
||||
/**
|
||||
* re-renders the content of the list view
|
||||
|
|
Loading…
Reference in New Issue