diff options
| author | Xavier Morel <xmo@odoo.com> | 2020-07-29 13:25:09 +0000 |
|---|---|---|
| committer | Xavier Morel <xmo@odoo.com> | 2020-07-30 05:37:05 +0000 |
| commit | 37a7aed1897dcb41d340fc509338a45e572659d5 (patch) | |
| tree | e39e130779df3930610c18d6030f20113f9d9814 /addons/note | |
| parent | a647497b5110fbff99dddfce66038fe9df48b603 (diff) | |
[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) <xmo@odoo.com>
Diffstat (limited to 'addons/note')
| -rw-r--r-- | addons/note/views/note_views.xml | 38 |
1 files changed, 17 insertions, 21 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"/> - - <menuitem - id="menu_note_configuration" - name="Configuration" - sequence="100" - parent="menu_note_notes" - groups="base.group_no_one"/> - - <menuitem - id="menu_notes_stage" - name="Stages" - parent="menu_note_configuration" - action="note.action_note_stage" - sequence="21"/> - - <menuitem - id="notes_tag_menu" - parent="menu_note_configuration" - action="note_tag_action" - sequence="22"/> + web_icon="note,static/description/icon.png"> + <menuitem + id="menu_note_configuration" + name="Configuration" + sequence="100" + groups="base.group_no_one"> + <menuitem + id="menu_notes_stage" + name="Stages" + action="note.action_note_stage" + sequence="21"/> + <menuitem + id="notes_tag_menu" + action="note_tag_action" + sequence="22"/> + </menuitem> + </menuitem> </odoo> |
