3
votes

can I edit the top right menu Odoo v8?

I want to remove "My Account odoo.com", "Help" and edit "about Odoo"

I used a module "Stop Phoning Home Feature from OpenERP" that does this, but it does not work with Odoo 8 : https://bitbucket.org/BizzAppDev/oerp_no_phoning_home

thank you

2
The README for "Stop Phoning Home Feature from OpenERP" claims that it works with Odoo 8. Are you sure that it doesn't? Anyway, here you can see how this is done.Ludwik Trammer
check that you have checkout the master branch. It is working perfect.Ruchir Shukla
@RuchirShukla what license are you using for your module? Can't find it on the addon.Ark74

2 Answers

1
votes

When I install "Stop Phoning Home Feature from OpenERP" used the module "Import module" : it doesn't work

But when I put the contents of the archive (the zip file) in the addons directory Odoo, Update the list of modules and then install the module "stop phoning" : that Works

0
votes

Hello RAFMAN,

If you want to remove the menu-item of the top right corner main menu of the odoo so following step apply,

  1. Extend the the BASE template of UserMenu.
  2. 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">
  <!-- replace UserMenu dropdown-menu defined in oddo_v8/addons/web/static/src/xml/base.xml -->
  <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">
  <!-- replace UserMenu dropdown-menu defined in oddo_v8/addons/web/static/src/xml/base.xml -->
  <t t-extend="UserMenu" >
    <!-- Remove My Odoo.com account Menu Item -->
    <t t-jquery="UserMenu.account" t-operation="replace"></t>

    <!-- Remove About Odoo Menu Item -->
    <t t-jquery="UserMenu.about" t-operation="replace"></t>

    <!-- Remove Help Menu Item -->
    <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">
      <!-- replace UserMenu dropdown-menu defined in oddo_v8/addons/web/static/src/xml/base.xml -->
      <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>