Odoo Help


6 Answers

René Schuster Germany

--René Schuster--
| 7 7 10
Weinheim, Germany
--René Schuster--

Challenge Everything!

René Schuster Germany
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)

shafeequemonp India
3/6/14, 6:31 AM

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..

shafeequemonp India
3/6/14, 11:20 PM

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

shafeequemonp India
3/7/14, 12:01 AM

its fixed..

om India
5/9/19, 1:16 AM

than you have the external id of that menu item ...........

once it's fetched put that link into your menu...like ex:-

<menuitem id="something" parent="[fetched external id]" name="something_else"/>

please give proper external id to show that menu under the main men

Salim hachemaoui Algeria
3/28/19, 1:29 PM

 want to create a sub menus in the main menu in sale / crm .someone can help me ?

Ask a Question
Keep Informed
1 follower(s)
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