Overslaan naar inhoud
Odoo Menu
  • Aanmelden
  • Probeer het gratis
  • Apps
    Financiën
    • Boekhouding
    • Facturatie
    • Onkosten
    • Spreadsheet (BI)
    • Documenten
    • Ondertekenen
    Verkoop
    • CRM
    • Verkoop
    • Kassasysteem winkel
    • Kassasysteem Restaurant
    • Abonnementen
    • Verhuur
    Websites
    • Websitebouwer
    • E-commerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Bevoorradingsketen
    • Voorraad
    • Productie
    • PLM
    • Inkoop
    • Onderhoud
    • Kwaliteit
    Personeelsbeheer
    • Werknemers
    • Werving & Selectie
    • Verlof
    • Evaluaties
    • Aanbevelingen
    • Wagenpark
    Marketing
    • Social media Marketing
    • E-mailmarketing
    • SMS Marketing
    • Evenementen
    • Marketingautomatisering
    • Enquêtes
    Diensten
    • Project
    • Urenstaten
    • Buitendienst
    • Helpdesk
    • Planning
    • Afspraken
    Productiviteit
    • Chat
    • Goedkeuringen
    • IoT
    • VoIP
    • Kennis
    • WhatsApp
    Apps van derden Odoo Studio Odoo Cloud Platform
  • Bedrijfstakken
    Detailhandel
    • Boekhandel
    • kledingwinkel
    • Meubelzaak
    • Supermarkt
    • Bouwmarkt
    • Speelgoedwinkel
    Food & Hospitality
    • Bar en Pub
    • Restaurant
    • Fastfood
    • Gastenverblijf
    • Drankenhandelaar
    • Hotel
    Vastgoed
    • Makelaarskantoor
    • Architectenbureau
    • Bouw
    • Vastgoedbeheer
    • Tuinieren
    • Vereniging van eigenaren
    Consulting
    • Accountantskantoor
    • Odoo Partner
    • Marketingbureau
    • Advocatenkantoor
    • Talentenwerving
    • Audit & Certificering
    Productie
    • Textiel
    • Metaal
    • Meubels
    • Eten
    • Brewery
    • Relatiegeschenken
    Gezondheid & Fitness
    • Sportclub
    • Opticien
    • Fitnesscentrum
    • Wellness-medewerkers
    • Apotheek
    • Kapper
    Trades
    • Klusjesman
    • IT-hardware & support
    • Zonne-energiesystemen
    • Schoenmaker
    • Schoonmaakdiensten
    • HVAC-diensten
    Andere
    • Non-profitorganisatie
    • Milieuagentschap
    • Verhuur van Billboards
    • Fotograaf
    • Fietsleasing
    • Softwareverkoper
    Browse all Industries
  • Community
    Leren
    • Tutorials
    • Documentatie
    • Certificeringen
    • Training
    • Blog
    • Podcast
    Versterk het onderwijs
    • Onderwijs- programma
    • Scale Up! Business Game
    • Bezoek Odoo
    Download de Software
    • Downloaden
    • Vergelijk edities
    • Releases
    Werk samen
    • Github
    • Forum
    • Evenementen
    • Vertalingen
    • Word een Partner
    • Services for Partners
    • Registreer je accountantskantoor
    Diensten
    • Vind een partner
    • Vind een boekhouder
    • Een adviseur ontmoeten
    • Implementatiediensten
    • Klantreferenties
    • Ondersteuning
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Vraag een demo aan
  • Prijzen
  • Help

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

  • CRM
  • e-Commerce
  • Boekhouding
  • Voorraad
  • PoS
  • Project
  • MRP
All apps
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Alle posts Personen Badges
Labels (Bekijk alle)
odoo accounting v14 pos v15
Over dit forum
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Alle posts Personen Badges
Labels (Bekijk alle)
odoo accounting v14 pos v15
Over dit forum
Help

Add New Menu Item in my odoo website using code.

Inschrijven

Ontvang een bericht wanneer er activiteit is op deze post

Deze vraag is gerapporteerd
headermenuitem
2 Antwoorden
2702 Weergaven
Avatar
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
Avatar
Annuleer
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.

Avatar
D Enterprise
Beste antwoord

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
Avatar
Annuleer
Essotina Ati
Auteur

Thanks ! It works properly rights now.

Avatar
Cybrosys Techno Solutions Pvt.Ltd
Beste antwoord

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
Avatar
Annuleer
Essotina Ati
Auteur

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

Geniet je van het gesprek? Blijf niet alleen lezen, doe ook mee!

Maak vandaag nog een account aan om te profiteren van exclusieve functies en deel uit te maken van onze geweldige community!

Aanmelden
Gerelateerde posts Antwoorden Weergaven Activiteit
Get menuitem list Opgelost
menuitem
Avatar
Avatar
Avatar
3
dec. 21
8139
Disabled Menu Items Without using groups
menuitem
Avatar
0
dec. 18
3220
How to delete menuitem? Opgelost
menuitem
Avatar
Avatar
Avatar
Avatar
Avatar
7
okt. 18
23357
Changed Main Menu Item but name is not displaying (Odoo 11 Community version) Opgelost
menuitem
Avatar
Avatar
2
nov. 17
7203
How to add a menu in the name of the current login username?
menuitem
Avatar
0
apr. 17
3103
Community
  • Tutorials
  • Documentatie
  • Forum
Open Source
  • Downloaden
  • Github
  • Runbot
  • Vertalingen
Diensten
  • Odoo.sh Hosting
  • Ondersteuning
  • Upgrade
  • Gepersonaliseerde ontwikkelingen
  • Onderwijs
  • Vind een boekhouder
  • Vind een partner
  • Word een Partner
Over ons
  • Ons bedrijf
  • Merkelementen
  • Neem contact met ons op
  • Vacatures
  • Evenementen
  • Podcast
  • Blog
  • Klanten
  • Juridisch • Privacy
  • Beveiliging
الْعَرَبيّة 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 is een suite van open source zakelijke apps die aan al je bedrijfsbehoeften voldoet: CRM, E-commerce, boekhouding, inventaris, kassasysteem, projectbeheer, enz.

Odoo's unieke waardepropositie is om tegelijkertijd zeer gebruiksvriendelijk en volledig geïntegreerd te zijn.

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