Skip to Content
Odoo Meniu
  • Autentificare
  • Try it free
  • Aplicații
    Finanțe
    • Contabilitate
    • Facturare
    • Cheltuieli
    • Spreadsheet (BI)
    • Documente
    • Semn
    Vânzări
    • CRM
    • Vânzări
    • POS Shop
    • POS Restaurant
    • Abonamente
    • Închiriere
    Site-uri web
    • Constructor de site-uri
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Lanț Aprovizionare
    • Inventar
    • Producție
    • PLM
    • Achiziție
    • Maintenance
    • Calitate
    Resurse Umane
    • Angajați
    • Recrutare
    • Time Off
    • Evaluări
    • Referințe
    • Flotă
    Marketing
    • Social Marketing
    • Marketing prin email
    • SMS Marketing
    • Evenimente
    • Automatizare marketing
    • Sondaje
    Servicii
    • Proiect
    • Foi de pontaj
    • Servicii de teren
    • Centru de asistență
    • Planificare
    • Programări
    Productivitate
    • Discuss
    • Aprobări
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Aplicații Terțe Odoo Studio Platforma Odoo Cloud
  • Industrii
    Retail
    • Book Store
    • Magazin de îmbrăcăminte
    • Magazin de Mobilă
    • Magazin alimentar
    • Magazin de materiale de construcții
    • Magazin de jucării
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Distribuitor de băuturi
    • Hotel
    Proprietate imobiliara
    • Real Estate Agency
    • Firmă de Arhitectură
    • Construcție
    • Estate Managament
    • Grădinărit
    • Asociația Proprietarilor de Proprietăți
    Consultanta
    • Firma de Contabilitate
    • Partener Odoo
    • Agenție de marketing
    • Law firm
    • Atragere de talente
    • Audit & Certification
    Producție
    • Textil
    • Metal
    • Mobilier
    • Mâncare
    • Brewery
    • Cadouri corporate
    Health & Fitness
    • Club Sportiv
    • Magazin de ochelari
    • Centru de Fitness
    • Wellness Practitioners
    • Farmacie
    • Salon de coafură
    Trades
    • Handyman
    • IT Hardware and Support
    • Asigurare socială de stat
    • Cizmar
    • Servicii de curățenie
    • HVAC Services
    Altele
    • Organizație nonprofit
    • Agenție de Mediu
    • Închiriere panouri publicitare
    • Fotografie
    • Închiriere biciclete
    • Asigurare socială
    Browse all Industries
  • Comunitate
    Învăță
    • Tutorials
    • Documentație
    • Certificări
    • Instruire
    • Blog
    • Podcast
    Empower Education
    • Program Educațional
    • Scale Up! Business Game
    • Visit Odoo
    Obține Software-ul
    • Descărcare
    • Compară Edițiile
    • Lansări
    Colaborați
    • Github
    • Forum
    • Evenimente
    • Translations
    • Devino Partener
    • Services for Partners
    • Înregistrează-ți Firma de Contabilitate
    Obține Servicii
    • Găsește un Partener
    • Găsiți un contabil
    • Meet an advisor
    • Servicii de Implementare
    • Referințe ale clienților
    • Suport
    • Actualizări
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Obține un demo
  • Prețuri
  • Ajutor

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

  • CRM
  • e-Commerce
  • Contabilitate
  • Inventar
  • PoS
  • Proiect
  • MRP
All apps
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Suport

Add New Menu Item in my odoo website using code.

Abonare

Primiți o notificare când există activitate la acestă postare

Această întrebare a fost marcată
headermenuitem
2 Răspunsuri
2694 Vizualizări
Imagine profil
Essotina Ati

I'd like to add a menu to the odoo site. I wanted to inject the new item directly into model.website, but I've noticed that it persists in the database and if I change the url, I have to raze everything before it takes. I read somewhere that I could do template inheritance, but I don't understand how it works. I've looked through articles without really understanding. I still have this error, but when I go to the browser inspector, I can see this class.


Error : "RPC_ERROR


Odoo Server Error


Occured on localhost:8069 on model ir.module.module and id 34 on 2025-07-21 13:07:12 GMT


Traceback (most recent call last):

  File "/usr/lib/python3/dist-packages/odoo/convert.py", line 548, in _tag_root

    raise ParseError(msg) from None  # Restart with "--log-handler odoo.tools.convert:DEBUG" for complete traceback

    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

odoo.tools.convert.ParseError: while parsing None:7

Erreur lors du parsing ou de la validation de la vue :


L'élément '<xpath expr="//ul[@id=&#39;top_menu&#39;]">' ne peut être localisé dans la vue parente


View error context:

{'file': '/mnt/extra-addons/visit_veone/views/visit_veone_custom_menu.xml',

'line': 1,

'name': 'Ajouter lien visite (desktop)',

'view': ir.ui.view(1436,),

'view.model': False,

'view.parent': ir.ui.view(611,),

'xmlid': 'visit_veone_menu_item'}



The above server error caused the following client error:

RPC_ERROR: Odoo Server Error

    RPCError@http://localhost:8069/web/assets/eef1bc0/web.assets_web.min.js:3141:338

    makeErrorFromResponse@http://localhost:8069/web/assets/eef1bc0/web.assets_web.min.js:3144:163

    rpc._rpc/promise</<@http://localhost:8069/web/assets/eef1bc0/web.assets_web.min.js:3149:34

   "

0
Imagine profil
Abandonează
Ard van Someren

Have you tried to implement the new menu with studio?

Christoph Farnleitner

Please share visit_veone/views/visit_veone_custom_menu.xml as this results in an error according to your post.

Imagine profil
D Enterprise
Cel mai bun răspuns

Hii,

Find the Correct Parent Template

The top menu is usually part of:

<template id = "website.layout" ... >

So you want to inherit from that.

Create Your XML View

Here's a working example that injects a link into the top menu bar:

<!-- File: visit_veone/views/visit_veone_custom_menu.xml --> <odoo> <template id = "visit_veone_menu_item" inherit_id = "website.layout"> <xpath expr = "//header//nav//ul[contains(@class, 'o_menu_sections')]" position = "inside"> <li class = "nav-item"> <a class = "nav-link" href = "/my-custom-url" >Visit Page </a> </li> </xpath> </template> </ odoo >

This will add a new top menu link to /my-custom-url .

Include It in Your Manifest

Make sure visit_veone_custom_menu.xml is loaded in your __manifest__.py :

'data' : [ 'views/visit_veone_custom_menu.xml' , ],

How to Avoid "Element Not Found" XPath Errors
Tips:
  • Inspect the rendered HTML in the browser , and search for the element (eg, ul.o_menu_sections ) to confirm it exists.
  • Do not guess IDs like top_menu unless you see them explicitly in the template. Odoo's website uses classes more than IDs.

i hope it is usefull

0
Imagine profil
Abandonează
Essotina Ati
Autor

Thanks ! It works properly rights now.

Imagine profil
Cybrosys Techno Solutions Pvt.Ltd
Cel mai bun răspuns

Hi,


Refer to the following



* https://www.cybrosys.com/blog/how-to-create-menu-pages-and-mega-menu-in-website-odoo-18

* https://www.cybrosys.com/odoo/videos/technical/how-to-add-menu-in-odoo-website

* https://www.cybrosys.com/blog/how-to-create-menu-pages-and-mega-menu-in-website-odoo-18



Hope it helps

0
Imagine profil
Abandonează
Essotina Ati
Autor

Thank you so much! I love your tutorials! You explain the concept in great detail and it's very impressive.

Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Înscrie-te
Related Posts Răspunsuri Vizualizări Activitate
Get menuitem list Rezolvat
menuitem
Imagine profil
Imagine profil
Imagine profil
3
dec. 21
8134
Disabled Menu Items Without using groups
menuitem
Imagine profil
0
dec. 18
3218
How to delete menuitem? Rezolvat
menuitem
Imagine profil
Imagine profil
Imagine profil
Imagine profil
Imagine profil
7
oct. 18
23347
Changed Main Menu Item but name is not displaying (Odoo 11 Community version) Rezolvat
menuitem
Imagine profil
Imagine profil
2
nov. 17
7203
How to add a menu in the name of the current login username?
menuitem
Imagine profil
0
apr. 17
3102
Comunitate
  • Tutorials
  • Documentație
  • Forum
Open Source
  • Descărcare
  • Github
  • Runbot
  • Translations
Servicii
  • Hosting Odoo.sh
  • Suport
  • Actualizare
  • Custom Developments
  • Educație
  • Găsiți un contabil
  • Găsește un Partener
  • Devino Partener
Despre Noi
  • Compania noastră
  • Active de marcă
  • Contactați-ne
  • Locuri de muncă
  • Evenimente
  • Podcast
  • Blog
  • Clienți
  • Aspecte juridice • Confidențialitate
  • Securitate
الْعَرَبيّة 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 este o suită de aplicații de afaceri open source care acoperă toate nevoile companiei dvs.: CRM, comerț electronic, contabilitate, inventar, punct de vânzare, management de proiect etc.

Propunerea de valoare unică a Odoo este să fie în același timp foarte ușor de utilizat și complet integrat.

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