From 09d99246880ecb662234e05b6ebe0688a84895bd Mon Sep 17 00:00:00 2001 From: Romain Derie Date: Wed, 30 Jun 2021 16:28:00 +0000 Subject: [PATCH] [IMP] website: don't show parent menu if only non-visible children Before this commit, if a parent menu had child menus and all of those were not visible (eg linked to an unpublished page), that parent menu would still be shown. While it is more a choice than an error, it might makes more sense to not show it as most of the time, that parent menu has no sense itself, it just served as a way to group submenus. Its URL can't be clicked (as it opens a dropdown) despite the fact it is required, and is actually most of the time a random URL typed by the user as it has no real purpose. The parent menu is just used as a dropdown entry and shouldn't be displayed if there is nothing in the dropdown, instead of converting it to a regular menu. Historically, it was decided to do it that way to fulfill this usecase: - /dogs - /german-sheperds - /beagles If you were to unpublished your beagles and german sheperds pages, the menu would auto convert to a regular menu pointing to your dogs page. This use case now seems less prefered than the behavior to hide that menu. task-2583737 closes odoo/odoo#73020 Signed-off-by: Romain Derie --- addons/website/views/website_templates.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/website/views/website_templates.xml b/addons/website/views/website_templates.xml index 57f440624aa..aab81b13f8c 100644 --- a/addons/website/views/website_templates.xml +++ b/addons/website/views/website_templates.xml @@ -2,8 +2,8 @@