Anudocs
Anudocs

Reputation: 686

Odoo 10 : Extending existing module to show new menu item

I create a new module called employee_devies to add a new menu item in Employees (hr) module.

My manifest.py :

'depends': ['base','hr'],

and views.xml :

<odoo>
  <data>
<menuitem id="menu_test" parent="hr.menu_hr_root" name="Test" sequence="1"/>
 </data>
</odoo>

However,this new menu doesnt appear in Employees(hr) module.I also dont get any error as well. What is the right way to do this?

Upvotes: 1

Views: 570

Answers (2)

Vishnu VaNnErI
Vishnu VaNnErI

Reputation: 931

Please Provide action to the menu

 <odoo>
      <data>
    <menuitem id="menu_test" action="Your Action Here" parent="hr.menu_hr_root" name="Test" sequence="1"/>
     </data>
    </odoo>

Upvotes: 2

aekis.dev
aekis.dev

Reputation: 2764

Your menu item menu_test is a folder menu. That means it will only became visible if it has some childs action menus. You could change your menu into an action menu just by providing the attribute action in the menuitem definition or add another menu with a parent attribute with the value of menu_test and an attribute action set in place(this last option could be at any level of a hierarchy of parent/childs menus, not need to be in the first child level). Both solutions will make it visible

Upvotes: 2

Related Questions