From bc3991b4c58d20969816c644dd57bae68b103ba8 Mon Sep 17 00:00:00 2001 From: Ravish Murari Date: Thu, 7 Aug 2014 18:04:42 +0530 Subject: [PATCH] [FIX] board: Do not offer to create dashboard when there is no action In case we have no defined action (e.g. redirection by python code), adding a dashboard should not be possible as the rendering based on the action. This patch hides the 'Add to Dashboard' button in search view (opw 611288) --- addons/board/static/src/js/dashboard.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/board/static/src/js/dashboard.js b/addons/board/static/src/js/dashboard.js index 65737ad234e..d2587c87add 100644 --- a/addons/board/static/src/js/dashboard.js +++ b/addons/board/static/src/js/dashboard.js @@ -424,7 +424,7 @@ instance.web.SearchView.include({ add_common_inputs: function() { this._super(); var vm = this.getParent().getParent(); - if (vm.inner_action && vm.inner_action.views) { + if (vm.inner_action && vm.inner_action.id && vm.inner_action.views) { (new instance.board.AddToDashboard(this)); } }