From b9759971b958bfbd686b201cb510176259889c4e Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Wed, 2 Nov 2016 10:43:50 +0100 Subject: [PATCH] [FIX] board: action_id not available in modal The favorites menu is always added in search views. Then the menu "add to dashboard" is always added even if it is triggered from a form view in a modal. In this case, the action_id is not available in the object FavoriteMenu. If the action_id is not available, the menu "add to dashboard" is hidden. opw:692023 --- addons/board/static/src/js/dashboard.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addons/board/static/src/js/dashboard.js b/addons/board/static/src/js/dashboard.js index a743cb6562f..9460ab39fee 100644 --- a/addons/board/static/src/js/dashboard.js +++ b/addons/board/static/src/js/dashboard.js @@ -347,6 +347,9 @@ core.form_tag_registry FavoriteMenu.include({ start: function () { var self = this; + if(this.action_id === undefined) { + return this._super(); + } var am = this.findAncestor(function (a) { return a instanceof ActionManager; });