From 4c75931f6cbf624612ab5b2d97a3708df9e69c2d Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Thu, 21 Mar 2013 12:46:05 +0100 Subject: [PATCH] [FIX] board: hide the "Add To Dashboard" option in search views when current action is incompatible (e.g. client actions don't work in dashboards at the moment) lp bug: https://launchpad.net/bugs/1157896 fixed bzr revid: odo@openerp.com-20130321114605-2ddj46q2pkswm36b --- addons/board/static/src/js/dashboard.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/addons/board/static/src/js/dashboard.js b/addons/board/static/src/js/dashboard.js index bd9625a4fa8..3489b686e1b 100644 --- a/addons/board/static/src/js/dashboard.js +++ b/addons/board/static/src/js/dashboard.js @@ -419,8 +419,10 @@ instance.board.AddToDashboard = instance.web.search.Input.extend({ instance.web.SearchView.include({ add_common_inputs: function() { this._super(); - (new instance.board.AddToDashboard(this)); - + var vm = this.getParent().getParent(); + if (vm.inner_action && vm.inner_action.views) { + (new instance.board.AddToDashboard(this)); + } } });