From 4c35dde0e06e54d0ab8261aa3a8ae5c6e75b7360 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Tue, 13 Sep 2011 08:47:45 +0200 Subject: [PATCH] [FIX] reintroduce code which was not redundant after all bzr revid: xmo@openerp.com-20110913064745-xk3xgmqkmu2zh6hp --- addons/web/static/src/js/views.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/addons/web/static/src/js/views.js b/addons/web/static/src/js/views.js index 3ccdd672a0d..6c10174d109 100644 --- a/addons/web/static/src/js/views.js +++ b/addons/web/static/src/js/views.js @@ -307,6 +307,10 @@ openerp.web.ViewManagerAction = openerp.web.ViewManager.extend(/** @lends oepner * @param {Object} action descriptor for the action this viewmanager needs to manage its views. */ init: function(parent, action) { + // dataset initialization will take the session from ``this``, so if we + // do not have it yet (and we don't, because we've not called our own + // ``_super()``) rpc requests will blow up. + this.session = parent.session; this.action = action; var dataset = new openerp.web.DataSetSearch(this, action.res_model, action.context, action.domain); if (action.res_id) { @@ -316,7 +320,8 @@ openerp.web.ViewManagerAction = openerp.web.ViewManager.extend(/** @lends oepner this._super(parent, dataset, action.views); this.flags = this.action.flags || {}; if (action.res_model == 'board.board' && action.views.length == 1 && action.views) { - // Not elegant but allows to avoid flickering of SearchView#do_hide + // Not elegant but allows to avoid form chrome (pager, save/new + // buttons, sidebar, ...) displaying this.flags.search_view = this.flags.pager = this.flags.sidebar = this.flags.action_buttons = false; } },