From 66af6664c1dfbc8bb94a15eb142da12aa936b25d Mon Sep 17 00:00:00 2001 From: Younn Olivier Date: Wed, 27 Apr 2022 15:35:52 +0200 Subject: [PATCH] [FIX] website, web: fix opening configurator after installing website module Before that commit, opening the client action was not possible directly after installing the website module (the client action javscript class was not yet added to the actions registry). An action_id param is added to the reload action, so that it can open the website configurator after reloading the webclient. See merge commit for more information. task-2687506 --- addons/web/static/src/legacy/js/core/misc.js | 6 ++++++ addons/website/views/website_views.xml | 9 +++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/addons/web/static/src/legacy/js/core/misc.js b/addons/web/static/src/legacy/js/core/misc.js index a457f61984e..9b1e1842886 100644 --- a/addons/web/static/src/legacy/js/core/misc.js +++ b/addons/web/static/src/legacy/js/core/misc.js @@ -130,6 +130,7 @@ function redirect (url, wait) { function Reload(parent, action) { var params = action.params || {}; var menu_id = params.menu_id || false; + var action_id = params.action_id || false; var l = window.location; var sobj = $.deparam(l.search.substr(1)); @@ -141,6 +142,11 @@ function Reload(parent, action) { var hash = l.hash; if (menu_id) { hash = "#menu_id=" + menu_id; + if (action_id) { + hash += "&action=" + action_id; + } + } else if (action_id) { + hash = "#action=" + action_id; } var url = l.protocol + "//" + l.host + l.pathname + search + hash; diff --git a/addons/website/views/website_views.xml b/addons/website/views/website_views.xml index 9957b991027..340a14073c1 100644 --- a/addons/website/views/website_views.xml +++ b/addons/website/views/website_views.xml @@ -656,10 +656,15 @@ fullscreen + + Open Website Configurator + reload + + + Start Website Configurator - - 0 +