[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
This commit is contained in:
Goffin Simon
2016-11-03 10:54:06 +01:00
parent 0ca99ffc1f
commit b9759971b9
+3
View File
@@ -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;
});