summaryrefslogtreecommitdiff
path: root/addons/web
diff options
context:
space:
mode:
authorPriyanka Kakadiya <pka@odoo.com>2018-07-03 12:28:13 +0530
committerAlexandre Kühn <aku@odoo.com>2018-07-23 13:48:09 +0200
commit78a6124d5ab4eb0b44fdcbd455d9f322d18b8a70 (patch)
treeb7be0e849cb479f5d33b21ec9670ebd0b4d0719d /addons/web
parent23d840ddce353b9771415a17e6cd4ea73cbb28a5 (diff)
[FIX] web: no traceback on button call action of type `'button'`.
Before this commit, there was a traceback when clicking on a button that generates a button call action with type `'button'`. This is due to the handler of such an action that assumes only a small set of button actions. Each of those cases correctly sets the local variable `def` to a deferred, so that the post-processing is correct (i.e. it handles this variable as a deferred). However, this is wrong with a different button call action, so that this variable is `undefined` instead of a deferred. This commit fixes the issue by ensuring that the variable `def` is always a deferred. As a result, the post-processing can make the correct assumption that this variable is a deferred. Steps to reproduce: - Install Google Drive Integration app - Go to General Settings - In the category "Google Drive", click on "Get Authorization Code" (displayed as "Get Author...") Task-ID 1861630
Diffstat (limited to 'addons/web')
-rw-r--r--addons/web/static/src/js/chrome/action_manager_act_window.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web/static/src/js/chrome/action_manager_act_window.js b/addons/web/static/src/js/chrome/action_manager_act_window.js
index 39277248480..9a9ed62e6be 100644
--- a/addons/web/static/src/js/chrome/action_manager_act_window.js
+++ b/addons/web/static/src/js/chrome/action_manager_act_window.js
@@ -663,7 +663,7 @@ ActionManager.include({
var env = ev.data.env;
var context = new Context(env.context, actionData.context || {});
var recordID = env.currentID || null; // pyeval handles null value, not undefined
- var def;
+ var def = $.Deferred();
// determine the action to execute according to the actionData
if (actionData.special) {