Hello RAFMAN,
If you want to remove the menu-item of the top right corner main menu of the odoo so following step apply,
- Extend the the BASE template of UserMenu.
- In this two case posible,
2.1 If you want to remove base menu item so Replace
base template and add your menu-item.
2.2 If you want to add the new menu item in existing base menu so give postion inner
.
your question of answer for try below code,
2.1 The first thing it does is defining a qweb template to replace the UserMenu definition:
- First i create one file like inherit_base.xml and this file put on the static/src/xml/inherit_base.xml and this file also add in the 'qweb'
section of your __openerp__.py
file.
<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">
<t t-extend="UserMenu" >
<t t-jquery="ul.dropdown-menu" t-operation="replace">
<li><a href="#" data-menu="Your_Menu_Name">Your Menu Name</a></li>
....
</t>
</t>
</templates>
Or If you want to remove any particular menu-item so use
<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">
<t t-extend="UserMenu" >
<t t-jquery="UserMenu.account" t-operation="replace"></t>
<t t-jquery="UserMenu.about" t-operation="replace"></t>
<t t-jquery="UserMenu.help" t-operation="replace"></t>
</t>
</templates>
2.2 Same as above but some diffrence, In tis case add the new menu-item in existing menu and also add the action of this new menu-item using js other wise click on new menu-item so not any action performed. So add the action anyone.
<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">
<t t-extend="UserMenu" >
<t t-jquery="ul.dropdown-menu" t-operation="inner">
<li><a href="#" data-menu="Your_Menu_Name">Your Menu Name</a></li>
....
</t>
</t>
</templates>