From 1dea9ed16fedae2b8d08328b03b84d1fe5948694 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Thu, 11 Aug 2011 16:44:07 +0200 Subject: [PATCH] [FIX] when reloading the view description thingie, the listview needs to send the search context along so stuff line invisible attributes (for invisible columns) can be correctly evaluated bzr revid: xmo@openerp.com-20110811144407-f5nlq89wqdh4z0pa --- addons/base/static/src/js/list.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/addons/base/static/src/js/list.js b/addons/base/static/src/js/list.js index e7abfdfaf0f..3032e702a73 100644 --- a/addons/base/static/src/js/list.js +++ b/addons/base/static/src/js/list.js @@ -352,8 +352,9 @@ openerp.base.ListView = openerp.base.View.extend( /** @lends openerp.base.ListVi * Reloads the list view based on the current settings (dataset & al) * * @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) { + reload_view: function (grouped, context) { var self = this; var callback = function (field_view_get) { self.on_loaded(field_view_get, grouped); @@ -364,7 +365,7 @@ openerp.base.ListView = openerp.base.View.extend( /** @lends openerp.base.ListVi return this.rpc('/base/listview/load', { model: this.model, view_id: this.view_id, - context: this.dataset.get_context(), + context: this.dataset.get_context(context), toolbar: this.options.sidebar }, callback); } @@ -411,7 +412,7 @@ openerp.base.ListView = openerp.base.View.extend( /** @lends openerp.base.ListVi results.group_by = null; } - this.reload_view(!!results.group_by).then( + this.reload_view(!!results.group_by, results.context).then( $.proxy(this, 'reload_content')); }, /**