This question has been flagged
2 Replies
7939 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!

Avatar
Discard

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.)

Author

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.


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

groups="purchase.group_purchase_user,purchase.group_purchase_manager"

Author

Ah that makes sense, thanks Ray.

Best Answer

Try this

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

 

Avatar
Discard
Best Answer

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.

Avatar
Discard
Author

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