diff options
| author | Romeo Fragomeli <rfr@odoo.com> | 2019-10-09 09:18:11 +0000 |
|---|---|---|
| committer | fw-bot <otis@odoo.com> | 2019-10-14 12:11:22 +0000 |
| commit | 3e5cc15d16e7f0dd38e2bfc3edd2b4a241e0d5ac (patch) | |
| tree | db786b35f51a56e80b137c61b8fe3f029b099a43 /addons/web | |
| parent | c737dd50012543a35ee9e102bccfe9902313e1b1 (diff) | |
[FIX] web: warn is show when a client action is a function
Before this commit, if we use some client action like: reload, logout, ...
in the console a warning is show, because the action are function and not
AbstractAction.
After this commit, if the client action is not an function and not
a AbstractAction the warning is show.
X-original-commit: 122b76594aeb2c5d923d13c040c2da2048133aac
Diffstat (limited to 'addons/web')
| -rw-r--r-- | addons/web/static/src/js/chrome/action_manager.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/addons/web/static/src/js/chrome/action_manager.js b/addons/web/static/src/js/chrome/action_manager.js index 746460bdc4f..d049abaa8ec 100644 --- a/addons/web/static/src/js/chrome/action_manager.js +++ b/addons/web/static/src/js/chrome/action_manager.js @@ -420,9 +420,6 @@ var ActionManager = Widget.extend({ console.error("Could not find client action " + action.tag, action); return Promise.reject(); } - if (!(ClientAction.prototype instanceof AbstractAction)) { - console.warn('The client action ' + action.tag + ' should be an instance of AbstractAction!'); - } if (!(ClientAction.prototype instanceof Widget)) { // the client action might be a function, which is executed and // whose returned value might be another action to execute @@ -432,6 +429,9 @@ var ActionManager = Widget.extend({ } return Promise.resolve(); } + if (!(ClientAction.prototype instanceof AbstractAction)) { + console.warn('The client action ' + action.tag + ' should be an instance of AbstractAction!'); + } var controllerID = _.uniqueId('controller_'); |
