From 0caf14a96da0a7618c460045cee12077abc4b5b9 Mon Sep 17 00:00:00 2001 From: fja-odoo Date: Tue, 10 Sep 2019 09:26:21 +0000 Subject: [PATCH] [FIX] website: fix nested menu creation If the menu's parent is a newly created menu it will have a temp string id which was failing to be parsed as an int and thus falling back on the root menu as its parent. This was broken by the new mega menu feature introduced with https://github.com/odoo/odoo/commit/1345702258adbfbee0d780dc22e552395e6d1df7 task-2069365 closes odoo/odoo#36606 Signed-off-by: Quentin Smetz (qsm) --- addons/website/static/src/js/menu/content.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/website/static/src/js/menu/content.js b/addons/website/static/src/js/menu/content.js index a6f89d2afc8..c0daa93925f 100644 --- a/addons/website/static/src/js/menu/content.js +++ b/addons/website/static/src/js/menu/content.js @@ -544,7 +544,7 @@ var EditMenuDialog = weWidgets.Dialog.extend({ levels[menu.depth] = (levels[menu.depth] || 0) + 1; var menuFields = this.flat[menu.id].fields; menuFields['sequence'] = levels[menu.depth]; - menuFields['parent_id'] = parseInt(menu['parent_id']) || this.rootMenuID; + menuFields['parent_id'] = menu['parent_id'] || this.rootMenuID; data.push(menuFields); } });