From 9b57bfb6a2dcceaa224a64ff8dcfbe7bc6993b1e Mon Sep 17 00:00:00 2001 From: Priyanka Kakadiya Date: Tue, 17 Sep 2019 06:56:39 +0000 Subject: [FIX] web, *: button special not working to close dialog MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit *: event_sale mail sale_product_connfigurator stock Before this commit: if we open dialog from acitivity view and try to discard it (i.e. close it), it throws traceback. Issue arises from following commits: https://github.com/odoo/odoo/commit/d3d576cf8ec9e5b5f6ae5f9d8845cf384435f12d https://github.com/odoo/odoo/commit/3210f108272be89f1a7b01f4e1816b7f04ae0a3b Previously, special attribute was passed directly, but now `on_close` gets action info as an object. After this commit, it passes special key as an object for `on_close`, also changed special action based logic in other modules. Task-Id 2072181 closes odoo/odoo#37078 Signed-off-by: Alexandre Kühn (aku) Co-authored-by: Mohammed Shekha --- addons/web/static/src/js/chrome/action_manager_act_window.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'addons/web/static/src/js/chrome/action_manager_act_window.js') 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 6027e21bb42..8034a8e54b8 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 @@ -616,7 +616,10 @@ ActionManager.include({ // determine the action to execute according to the actionData if (actionData.special) { - def = Promise.resolve({type: 'ir.actions.act_window_close', infos: 'special'}); + def = Promise.resolve({ + type: 'ir.actions.act_window_close', + infos: { special: true }, + }); } else if (actionData.type === 'object') { // call a Python Object method, which may return an action to execute var args = recordID ? [[recordID]] : [env.resIDs]; -- cgit v1.2.3