Odoo Help


add top menu item in custom module [Closed]

on 3/5/14, 7:33 AM 18,852 views

The Question has been closed

Ray Carnes
on 03/08/2014 20:39:36

I need to create a menu item on top just before the settings item.can anyone help me ...


René Schuster

--René Schuster--
| 5 5 8
Weinheim, Germany
--René Schuster--

Challenge Everything!

René Schuster
On 3/5/14, 9:05 AM

Create a xml for your custom module.

        <menuitem name="Your Menu Name" id="your_menu_id" sequence="450"/>

Make sure the xml file is listed in your __openerp__.py file for your custom module.

A few notes:

  • The sequence gives the order for your menu items (low to high), 'Settings' menu got sequence 500, 'Reporting' menu got sequence 170
  • for submenues you can use the parent attribute inside the menu tag: e.g. parent="menu_hr_root". If you leave this attribute your menu item will be at the very top
  • to manage the visibility for your menu item, you can use the groups attribute inside the menu tag: e.g. groups="base.group_user".


A few more notes:

  • If you leave the groups attribute the menuitem will be visible to everyone
  • OpenERP seems to be 'smart'. A menu item will first become visible after it (or any sub menu) has an actual action to perform something
  • the menuitem tag for xml views is used to create all menues on any hierarchy level. The actual hierarchy is controlled by the parent attribute.


Example for a menu hierarchy:

        <menuitem name="Your Root Menu Name" id="your_root_menu_id" sequence="450"/>
        <menuitem name="Your Sub Menu Category Name" id="your_sub_menu_category_id" parent="your_root_menu_id" sequence="10"/>
        <menuitem name="Your Sub Menu Name" id="your_sub_menu_id" parent="your_sub_menu_category_id" sequence="5"/>
        <menuitem name="Another Sub Menu" id="another_menu_id" parent="your_sub_menu_category_id" sequence="10"/>

I recommend assigning actions to the lowest menu level only. (I'm not sure whether you can add a fourth level)

thanks sir ...fixed it and now need to create sub menus in left side when i click my root menu item..how can i do it ..may u please help..

on 3/6/14, 6:31 AM

k..sir while i creating more sub menus on root menu its not appearing ..how should i give the sequence number..

on 3/6/14, 11:20 PM

its fixed..

on 3/7/14, 12:01 AM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 3/5/14, 7:33 AM
Seen: 18852 times
Last updated: 7/23/16, 12:17 PM