To place a Menu under Other Module menus you need to include the Parent module in your __openerp__.py file and give the parent menu id in your menu item. Consider a model called Test.
To make that Module visible under Human Resources module do the following steps:
Step-1: in __openerp__.py add the following line "depends" : ["hr"],
Step-2: then in your view xml file add the following lines
Line-1: <menuitem id="menu_test" parent="hr.menu_hr_root" name="Test Module Parent"/>
Line-2: <menuitem id="menu_test_child" parent="menu_test" name="My Menu" action="action_test"/>
Here **parent="hr.menu_hr_root"** denotes the parent id under which you are going to place your menu. i.e., hr.menu_hr_root is the id of the Human Resource menu. And **name="Test Module Parent"** denotes your Test menu's parent name and it can be anything. The Line-2 denotes your clickable menu. Here the **action="action_test"** denotes the action to be carried out when you click on My Menu.
Menu Attribute
-
name=name of your menu
-
id=unique id for each menu item
- string = Name of your sting which you want display in your view form not string attribute is not define then the menu string automatically set as your menu action name
- action=name of your action which you want to call
- parent=your_dependent_module_name.parent menu id in your child menu if your parent menu is in your same module then the dependent module name is not needed to add in your parent attribute
- sequence =Define the sequence for the menu displaying in your view
Your answer
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
Keep Informed
About This Forum
This forum is for HiTechnologia Employees & just Odoo general knowledge purpose only.
Read GuidelinesQuestion tools
Stats
Asked: 7/8/15, 6:34 PM |
Seen: 11630 times |
Last updated: 7/8/15, 6:38 PM |