[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:
@@ -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);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user