From c635bebcfc4b8ececd7e8a7a9acd4670776d7641 Mon Sep 17 00:00:00 2001 From: Fabien Meghazi Date: Wed, 7 Dec 2011 16:59:13 +0100 Subject: [PATCH] [IMP] Update special case for dashboard bzr revid: fme@openerp.com-20111207155913-o5e9rpthflfw2z10 --- addons/web/static/src/js/views.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/addons/web/static/src/js/views.js b/addons/web/static/src/js/views.js index 40edc52ca87..403aa7ca87a 100644 --- a/addons/web/static/src/js/views.js +++ b/addons/web/static/src/js/views.js @@ -388,10 +388,16 @@ session.web.ViewManagerAction = session.web.ViewManager.extend(/** @lends oepner } this.dataset = dataset; this.flags = this.action.flags || {}; - if (action.res_model == 'board.board' && action.views.length == 1 && action.views) { - // Not elegant but allows to avoid form chrome (pager, save/new - // buttons, sidebar, ...) displaying - this.flags.display_title = this.flags.search_view = this.flags.pager = this.flags.sidebar = this.flags.action_buttons = false; + if (action.res_model == 'board.board' && action.view_mode === 'form') { + // Special case for Dashboards + _.extend(this.flags, { + views_switcher : false, + display_title : false, + search_view : false, + pager : false, + sidebar : false, + action_buttons : false + }); } // setup storage for session-wise menu hiding