From 4c186f30c3a77e661f0dfdd39fe2c1216ef1ac7b Mon Sep 17 00:00:00 2001 From: Nikunj Ladava Date: Wed, 31 Jan 2018 16:51:13 +0530 Subject: [FIX] web: ActionManager: handle false actions Server actions return an action to execute, or false. When they return false, an 'ir.actions.act_window_close' must be executed, such that the current dialog closes (if any) and mostly, the 'on_close' handler is executed, which ensures for example that the current view is reloaded. The case where server actions return false has been broken by rev. 32b8cec53. It produced tracebacks in several models, when clicking on some actions in the 'Action' dropdown. For instance, in lunch, go to Configuration > Products, open one in a form view, and click on 'Lunch: Archive/Restore products' in the Action dropdown. --- addons/web/static/src/js/chrome/action_manager.js | 1 + 1 file changed, 1 insertion(+) (limited to 'addons/web/static/src') diff --git a/addons/web/static/src/js/chrome/action_manager.js b/addons/web/static/src/js/chrome/action_manager.js index 237ce1f1c96..1651e5d72d9 100644 --- a/addons/web/static/src/js/chrome/action_manager.js +++ b/addons/web/static/src/js/chrome/action_manager.js @@ -510,6 +510,7 @@ var ActionManager = Widget.extend({ }, }); return this.dp.add(runDef).then(function (action) { + action = action || { type: 'ir.actions.act_window_close' }; return self.doAction(action, options); }); }, -- cgit v1.2.3