Skip to Content
Odoo Menu
  • Zaloguj się
  • Wypróbuj za darmo
  • Aplikacje
    Finanse
    • Księgowość
    • Fakturowanie
    • Wydatki
    • Arkusz kalkulacyjny (BI)
    • Dokumenty
    • Podpisy
    Sprzedaż
    • CRM
    • Sprzedaż
    • PoS Sklep
    • PoS Restauracja
    • Subskrypcje
    • Wypożyczalnia
    Strony Internetowe
    • Kreator Stron Internetowych
    • eCommerce
    • Blog
    • Forum
    • Czat na Żywo
    • eLearning
    Łańcuch dostaw
    • Magazyn
    • Produkcja
    • PLM
    • Zakupy
    • Konserwacja
    • Jakość
    Zasoby Ludzkie
    • Pracownicy
    • Rekrutacja
    • Urlopy
    • Ocena pracy
    • Polecenia Pracownicze
    • Flota
    Marketing
    • Marketing Społecznościowy
    • E-mail Marketing
    • SMS Marketing
    • Wydarzenia
    • Automatyzacja Marketingu
    • Ankiety
    Usługi
    • Projekt
    • Ewidencja czasu pracy
    • Usługi Terenowe
    • Helpdesk
    • Planowanie
    • Spotkania
    Produktywność
    • Dyskusje
    • Zatwierdzenia
    • IoT
    • VoIP
    • Baza wiedzy
    • WhatsApp
    Aplikacje trzecich stron Studio Odoo Odoo Cloud Platform
  • Branże
    Sprzedaż detaliczna
    • Księgarnia
    • Sklep odzieżowy
    • Sklep meblowy
    • Sklep spożywczy
    • Sklep z narzędziami
    • Sklep z zabawkami
    Żywienie i hotelarstwo
    • Bar i Pub
    • Restauracja
    • Fast Food
    • Pensjonat
    • Dystrybutor napojów
    • Hotel
    Agencja nieruchomości
    • Agencja nieruchomości
    • Biuro architektoniczne
    • Budowa
    • Zarządzanie nieruchomościami
    • Ogrodnictwo
    • Stowarzyszenie właścicieli nieruchomości
    Doradztwo
    • Biuro księgowe
    • Partner Odoo
    • Agencja marketingowa
    • Kancelaria prawna
    • Agencja rekrutacyjna
    • Audyt i certyfikacja
    Produkcja
    • Tekstylia
    • Metal
    • Meble
    • Jedzenie
    • Browar
    • Prezenty firmowe
    Zdrowie & Fitness
    • Klub sportowy
    • Salon optyczny
    • Centrum fitness
    • Praktycy Wellness
    • Apteka
    • Salon fryzjerski
    Transakcje
    • Złota rączka
    • Wsparcie Sprzętu IT
    • Systemy energii słonecznej
    • Szewc
    • Firma sprzątająca
    • Usługi HVAC
    Inne
    • Organizacja non-profit
    • Agencja Środowiskowa
    • Wynajem billboardów
    • Fotografia
    • Leasing rowerów
    • Sprzedawca oprogramowania
    Przeglądaj wszystkie branże
  • Community
    Ucz się
    • Samouczki
    • Dokumentacja
    • Certyfikacje
    • Szkolenie
    • Blog
    • Podcast
    Pomóż w nauce innym
    • Program Edukacyjny
    • Scale Up! Gra biznesowa
    • Odwiedź Odoo
    Skorzystaj z oprogramowania
    • Pobierz
    • Porównaj edycje
    • Wydania
    Współpracuj
    • Github
    • Forum
    • Wydarzenia
    • Tłumaczenia
    • Zostań partnerem
    • Usługi dla partnerów
    • Zarejestruj swoją firmę rachunkową
    Skorzystaj z usług
    • Znajdź partnera
    • Znajdź księgowego
    • Spotkaj się z doradcą
    • Usługi wdrożenia
    • Opinie klientów
    • Wsparcie
    • Aktualizacje
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Zaplanuj demo
  • Cennik
  • Pomoc

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Księgowość
  • Zapasy
  • PoS
  • Projekt
  • MRP
All apps
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
Wszystkie posty Osoby Odznaki
Tagi (Zobacz wszystko)
odoo accounting v14 pos v15
O tym forum
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
Wszystkie posty Osoby Odznaki
Tagi (Zobacz wszystko)
odoo accounting v14 pos v15
O tym forum
Pomoc

How to change the name of an existing menuitem?

Zaprenumeruj

Otrzymaj powiadomienie o aktywności w tym poście

To pytanie dostało ostrzeżenie
7 Odpowiedzi
55602 Widoki
Awatar
Juan Formoso Vasco

I'd like to change the label of a couple menu options. For example, I want to change the name of the main menu option Sales (crm). I know how to achieve this from the user interface, but it's better to do it through code.

I read in other posts that the only way to do this is declaring a new menuitem with the same ID of the menuitem you want to change. So, I want to change these ones (main menu option and submenu):

<menuitem name="Sales"
    id="menu_base_partner"
    groups="base.group_sale_salesman"
    sequence="20"/>
<menuitem id="base.menu_sales" parent="base.menu_base_partner" name="Sales" sequence="1" />

So I put this in my module code:

<menuitem name="My new string"
    id="menu_base_partner"
    groups="base.group_sale_salesman"
    sequence="20"/>
<menuitem id="base.menu_sales" parent="base.menu_base_partner" name="My new string" sequence="1" />

What is happening is that the top menu option "Sales" is turned into "My new string", which is correct. However, the submenu is not being changed and even more, the other submenus (which were in blue color) are being transformed in dropdown options.

If I remove the line <menuitem id="base.menu_sales" parent="base.menu_base_partner" name="My new string" sequence="1" />, the top menu option "Sales" is not being altered, and if I leave that line and add another menuitem whose parent is base.menu_sales, then both menu and submenu options are replaced well but the other submenus are being transformed in dropdown options.

Can anyone help me, please?

EDIT

I tried next code too, but nothing changed. I'm sure that the XML ID I'm using is right (I'm getting it from Configuration > User interface > Menu items)

<record model="ir.ui.menu" id="base.menu_base_partner">
     <field name="name">My New Menu Name</field>
</record>

1
Awatar
Odrzuć
Jesús Ventosinos
Jesús Ventosinos

sorry for multiple answers, you need to change id="menu_base_partner" to id="base.menu_base_partner"

Baiju KS

please let me know if that worked...??

Juan Formoso Vasco
Autor

@Jesus and @Baiju, with id="base.menu_base_partner", there are no errors but the menuitem name does not change.

Awatar
Niyas Raphy (Walnut Software Solutions)
Najlepsza odpowiedź

Hi,

For changing name of an existing menu item, you can do it like this,

<record model="ir.ui.menu" id="sales_team.menu_sale_config">
<field name="name">Configuration</field>
</record>

Refer:  How To Inherit Menu Item And Make Changes in Odoo

Thanks

3
Awatar
Odrzuć
Zahtoot

those 2 methodes mentioned in the video are not working on odoo 18 any solutions

Awatar
Marvin Taboada
Najlepsza odpowiedź

Hello Juan, menu entries are stored as records of the 'ir.ui.menu' object type, so it is possible to use 'record' XML tags to update 'ir.ui.menu' records by providing 'model' and 'id' attributes to identify the existing record. E.g. Project>Configuration (source here):

    <record model="ir.ui.menu" id="mod_id.menu_id">
      <field name="name">My New Menu Name</field>
    </record>

'record' XML tags are processed differently, so you only require to provide fields/values for anything you want to modify.

Regards,
Marvin

Edit: I created a simple module 'hr_menu_mv' to shorten the top level "Human Resources" menu to "HR", just to verify this approach, below are sources for the three files required (verified with v7.0 and v8.0):

__init__.py:

# empty as no python modules are required to be imported

__openerp__.py:

{
    'name': "HR Menu Mv",
    'version': "0.1",
    'category': "Human Resources",
    'depends': ['hr'],
    'data': ['hr_menu_mv_view.xml'],
    'installable': True,
    'auto_install': False,
    'application': False,
}

hr_menu_mv_view.xml:

<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>
        <record model="ir.ui.menu" id="hr.menu_hr_root">
            <field name="name">HR</field>
        </record>
    </data>
</openerp>

I'm omitting translations just to keep the example small and readable.

4
Awatar
Odrzuć
Juan Formoso Vasco
Autor

This is the way I like the most, but nothing happened. I tried this: My New Menu Name --- I am sure that the XML ID of the menu I want to change is that one (base.menu_base_partner), because I am looking for it in Configuration > User interface > Menu items. I am writing that code from my customized module. Do you see anything wrong?

Juan Formoso Vasco
Autor

I am sorry, I always forget that when I paste XML tags in a comment, these ones dissapear, so I am going to edit the question so you can check what I did.

Juan Formoso Vasco
Autor

Thank you for your patience Marvin. I did exactly what you did: I created a new module with your lines (for v7) However, nothing happened again. In my case, the XML ID of the main menu option of Human Resources is "hr.menu_hr_main". I tried with both, but still nothing. I restarted and updated the service and then pressed F5. No results.

Marvin Taboada

Juan, I have verified that the "base.menu_base_partner" menu entry is defined four time in v7.0 sources, once in the "base" module, and then three times in the following modules: "crm", "crm_helpdesk", "sale". If you're using any of the previous modules, chances are that your entry (either 'record' or 'menuitem') that renames "base.menu_base_partner" is not applied last (so it gets renamed to Sales again). In order to guarantee that your changes are applied last, you can declare module dependencies to any other modules that rename "base.menu_base_partner" ("crm", "crm_helpdesk", "sale") so your module will be installed after all of them.

Juan Formoso Vasco
Autor

One minute! I have just checked my database and the record name for that menu was changed well, as you said! But for one reason I can't see the changes in the browser.

Juan Formoso Vasco
Autor

I'm racking my brains to know why I can't see the changes on the browser, I tried a lot of things, but still nothing. One thing is clear: the code you gave me is changing my database, and it's working for you, so your answer is right. I will open another question to ask about my other problem, but this one is solved. Thank you a lot for your patience, Marvin.

Juan Formoso Vasco
Autor

I had to synchronize terms to see the changes: https://www.odoo.com/forum/help-1/question/why-cant-i-see-changes-made-on-the-table-ir-ui-menu-trying-to-change-a-menuitem-67732

iWesabe Technologies

+1

Awatar
Baiju KS
Najlepsza odpowiedź

Try this:-

<menuitem name="New String"
    id="sale.menu_base_partner"
    groups="base.group_sale_salesman"
    sequence="20"/>

3
Awatar
Odrzuć
Juan Formoso Vasco
Autor

Thank you! But that does not work, I get the next error: AssertionError: The ID "sale.menu_base_partner" refers to an uninstalled module. In fact, the menu I want to change is "base.menu_base_partner" (I can see it trough the OpenERP interface).

Awatar
Jesús Ventosinos
Najlepsza odpowiedź

if you want to override a id youn need to set the complete id module.id

0
Awatar
Odrzuć
Awatar
Soporte Jocaagura
Najlepsza odpowiedź

Do not forget insert into

<data noupdate="0">
<record model="ir.ui.menu" id="hr.menu_hr_root">
    <field name="name">HR</field>
<!-- in 11 version -->
    <field name="complete_name">HR</field>
</record>
</data>

to force the update of registry and CTRL+f5 in web browser to update the display name

0
Awatar
Odrzuć
Awatar
Xabier Arrabal Amat
Najlepsza odpowiedź

I had the same problem, after trying all the methods none worked. Finally I realized that there was a translation problem as the menuitem name term was already translated, therefor although the changes were made correctly they were not visible. Check out the tranlsation terms to check if your menu name is already there. The method I finally used was: 

<menuitem name="Sales"
id="account.menu_finance_receivables"
parent="account.menu_finance"
sequence="2"/>
0
Awatar
Odrzuć
Awatar
Billiard R Made
Najlepsza odpowiedź

Using an SQL Manager I would open ir_ui_menu and ir_ui_menu_group_rel and delete all records related to this particular Menu. Then ammend my template and update

Try code below. Paying attantion to my bold text. The two must be exact. If you put base.menu_base_partner on the first one then the bottom one must also be base.menu_base_partner

<menuitem name="My new string"
    id="menu_base_partner"
    groups="base.group_sale_salesman"
    sequence="20"/>
<menuitem id="base.menu_sales" parent="menu_base_partner" name=
"My new string" sequence="1" />

-1
Awatar
Odrzuć
Atchuthan - Technical Consultant, Sodexis Inc

@Billiard, This is a wrong methodology. When you delete the record directly using SQL manager, the corresponding menus are removed. But when you update your database using -u all command, then you will have multiple menus (old+newly created menu)

Podoba Ci się ta dyskusja? Dołącz do niej!

Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!

Zarejestruj się
Społeczność
  • Samouczki
  • Dokumentacja
  • Forum
Open Source
  • Pobierz
  • Github
  • Runbot
  • Tłumaczenia
Usługi
  • Hosting Odoo.sh
  • Wsparcie
  • Aktualizacja
  • Indywidualne rozwiązania
  • Edukacja
  • Znajdź księgowego
  • Znajdź partnera
  • Zostań partnerem
O nas
  • Nasza firma
  • Zasoby marki
  • Skontaktuj się z nami
  • Oferty pracy
  • Wydarzenia
  • Podcast
  • Blog
  • Klienci
  • Informacje prawne • Prywatność
  • Bezpieczeństwo Odoo
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo to pakiet aplikacji biznesowych typu open source, które zaspokoją wszystkie potrzeby Twojej firmy: CRM, eCommerce, księgowość, inwentaryzacja, punkt sprzedaży, zarządzanie projektami itp.

Unikalną wartością Odoo jest to, że jest jednocześnie bardzo łatwe w użyciu i w pełni zintegrowane.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now