From 37a7aed1897dcb41d340fc509338a45e572659d5 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Wed, 29 Jul 2020 13:25:09 +0000 Subject: [PATCH] [IMP] core: allow both action & children on root node Reported by VFE, odoo/odoo#54564 missed one of the use cases in menus: normally a menu can have *either* sub-menus or an action (aka only "leaf" menu items can have actions), however there's an exception for root (application) menus: those can have an action, which is used as the application's action, that is, what gets executed when opening the application itself. * root menus were already special cased (to allow a ``web_icon``), expand this to allow both action and submenus * modify the alternatives -- submenu-items and menuitems with a parent -- so they keep the behavior of allowing *either* an action or children closes odoo/odoo#55144 Signed-off-by: Xavier Morel (xmo) --- addons/note/views/note_views.xml | 38 ++++++++++++++------------------ odoo/import_xml.rng | 23 ++++++++++++------- 2 files changed, 32 insertions(+), 29 deletions(-) diff --git a/addons/note/views/note_views.xml b/addons/note/views/note_views.xml index 9e413c27866..33ab45a07a2 100644 --- a/addons/note/views/note_views.xml +++ b/addons/note/views/note_views.xml @@ -215,26 +215,22 @@ name="Notes" sequence="3" action="note.action_note_note" - web_icon="note,static/description/icon.png"/> - - - - - - + web_icon="note,static/description/icon.png"> + + + + + diff --git a/odoo/import_xml.rng b/odoo/import_xml.rng index 016f21dca8b..d7d28d6c4b0 100644 --- a/odoo/import_xml.rng +++ b/odoo/import_xml.rng @@ -234,8 +234,9 @@ + + - @@ -247,19 +248,25 @@ - - - + + + + + + + + + - - - + + + - +