Odoo Help

Welcome!

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

0

Changing Top Menu Item Name With Custom Module

v7
By
Alex Gallien
on 8/6/14, 3:20 PM 2,272 views

Due to the nature of my business problem I would like to change 'Purchases' in the top menu to read 'Receiving'. How would I modify this? I don't see any way to inherit like I would with a record:

        <menuitem name="Purchases"

            id="base.menu_purchase_root"

            groups="group_purchase_manager,group_purchase_user"

            sequence="60"/>

I tried to just insert that code with my changes, but it didn't work. Is there a way to do this? I have edited it with the UI, but this doesn't persist through backups. I could just edit it from there, but would really prefer to have it in a module. Thanks!

 

EDIT: I realized the error I was getting (ValueError: No such external ID currently defined in the system: TEST_EC_Quotations.group_purchase_manager) was from the groups that were defined. TEST_EC_Quotations is the name of my module - it looks like the groups are somehow associated with the module name. Is that correct? Removing that line helped, but now everyone can see the module regardless of permissions. How would I go about editing the groups so that I could restrict access to seeing this module? Thanks!

The above record creates or updates a menu with id="base.menu_purchase_root". The name of this menu is 'Purchases' - this is where you should be putting 'Receiving' (although this word normally represents "physically getting goods" rather than "ordering goods" which is what the Purchases menu covers.)

Bista Solutions US, Ray Carnes
on 8/6/14, 5:57 PM

Thanks for the response Ray. The system I am designing is for a plating company, so they receive unprocessed parts from a customer, plate them, and send them back. I am using purchasing to keep track of these transactions ("buying" the unprocessed part for $0 then selling the processed part). We have decided that it would be easier for the users in transitioning systems if it just says receiving. I realized the error was being generated by the user groups defined, and edited my question above, if you have time to check that out I'd appreciate it.

Alex Gallien
on 8/6/14, 6:12 PM

From: Alex Gallien
Sent: ‎8/‎6/‎2014 3:12 PM
To: Followers of Changing-Top-Menu-Item-Name-With-Custom-Module
Subject: Re: Changing Top Menu Item Name With Custom Module

Thanks for the response Ray. The system I am designing is for a plating company, so they receive unprocessed parts from a customer, plate them, and send them back. I am using purchasing to keep track of these transactions ("buying" the unprocessed part for $0 then selling the processed part). We have decided that it would be easier for the users in transitioning systems if it just says receiving. I realized the error was being generated by the user groups defined, and edited my question above, if you have time to check that out I'd appreciate it.

--
Alex Gallien Sent by OpenERP S.A. using Odoo. Access your messages and documents in Odoo
Bista Solutions US, Ray Carnes
on 8/6/14, 6:54 PM

groups="purchase.group_purchase_user,purchase.group_purchase_manager"

Bista Solutions US, Ray Carnes
on 8/7/14, 11:58 PM

Ah that makes sense, thanks Ray.

Alex Gallien
on 8/8/14, 12:33 AM
0

Atchuthan - Technical Consultant, Sodexis Inc

--Atchuthan - Technical Consultant, Sodexis Inc--
3918
| 5 3 8
Puducherry, India
--Atchuthan - Technical Consultant, Sodexis Inc--
Passionate coder in Python/Odoo(formerly known as OpenERP).

Contact me via GMail: atchuthantu@gmail.com via Skype: atchuthan_skype
via Linkedin: http://in.linkedin.com/in/atchuthantu
Atchuthan - Technical Consultant, Sodexis Inc
On 8/8/14, 12:50 AM

Try this

 <menuitem name="Purchases" id="base.menu_purchase_root" 
groups="purchase.group_purchase_manager,purchase.group_purchase_user" sequence="60"/>

 

0
Mind And Go
On 8/6/14, 3:31 PM

Hy,

2 ways for doing this, first overriding the menuitem like you do and also change its translation by a conf file.

Or go directly to the menu item, click modify, in the name part click on the flag for translation and change the different translations as you want.

Trying to override it like the code I posted gave me errors, is there something I need to add there? Like an inherit id?

Alex Gallien
on 8/6/14, 5:10 PM

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!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

3 follower(s)

Stats

Asked: 8/6/14, 3:20 PM
Seen: 2272 times
Last updated: 3/16/15, 8:10 AM