[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) <qsm@odoo.com>
This commit is contained in:
fja-odoo
2019-09-10 14:45:24 +00:00
committed by qsm-odoo
parent 8025205bb4
commit 0caf14a96d
+1 -1
View File
@@ -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);
}
});