From e2dd31cd7bb51f3908c8737f6d474312afa948f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20K=C3=BChn?= Date: Mon, 19 Mar 2018 13:17:22 +0100 Subject: [PATCH] [FIX] web: set correct menu_id on menu action Before this commit, the menu_id displayed in the url was incorrect when we click on a menu item for the first time. This is due to the fact that the web_client was mistakenly using the previous menu_id as the action's menu_id: the JS widget menu is not up-to-date with the value of the current menuID, and the web client was relying on its internal state instead of the server's response. With this commit, the web client uses the server's reponse to register the correct menuID that has been clicked. --- addons/web/static/src/js/chrome/web_client.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web/static/src/js/chrome/web_client.js b/addons/web/static/src/js/chrome/web_client.js index e7dcb2ae244..ebbc0bb3143 100644 --- a/addons/web/static/src/js/chrome/web_client.js +++ b/addons/web/static/src/js/chrome/web_client.js @@ -160,7 +160,7 @@ return AbstractWebClient.extend({ var completed = $.Deferred(); $.when(self.action_manager.do_action(result, { clear_breadcrumbs: true, - action_menu_id: self.menu.current_menu, + action_menu_id: options.id, })).fail(function() { self.menu.open_menu(options.previous_menu_id); }).always(function() {