Passa al contenuto
Odoo Menu
  • Accedi
  • Provalo gratis
  • App
    Finanze
    • Contabilità
    • Fatturazione
    • Note spese
    • Fogli di calcolo (BI)
    • Documenti
    • Firma
    Vendite
    • CRM
    • Vendite
    • Punto vendita Negozio
    • Punto vendita Ristorante
    • Abbonamenti
    • Noleggi
    Siti web
    • Configuratore sito web
    • E-commerce
    • Blog
    • Forum
    • Live chat
    • E-learning
    Supply chain
    • Magazzino
    • Produzione
    • PLM
    • Acquisti
    • Manutenzione
    • Qualità
    Risorse umane
    • Dipendenti
    • Assunzioni
    • Ferie
    • Valutazioni
    • Referral dipendenti
    • Parco veicoli
    Marketing
    • Social marketing
    • E-mail marketing
    • SMS marketing
    • Eventi
    • Marketing automation
    • Sondaggi
    Servizi
    • Progetti
    • Fogli ore
    • Assistenza sul campo
    • Helpdesk
    • Pianificazione
    • Appuntamenti
    Produttività
    • Comunicazioni
    • Intelligenza artificiale
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    App di terze parti Odoo Studio Piattaforma cloud Odoo
  • Settori
    Retail
    • Libreria
    • Negozio di abbigliamento
    • Negozio di arredamento
    • Alimentari
    • Ferramenta
    • Negozio di giocattoli
    Cibo e ospitalità
    • Bar e pub
    • Ristorante
    • Fast food
    • Pensione
    • Grossista di bevande
    • Hotel
    Agenzia immobiliare
    • Agenzia immobiliare
    • Studio di architettura
    • Edilizia
    • Gestione immobiliare
    • Impresa di giardinaggio
    • Associazione di proprietari immobiliari
    Consulenza
    • Società di contabilità
    • Partner Odoo
    • Agenzia di marketing
    • Studio legale
    • Selezione del personale
    • Audit e certificazione
    Produzione
    • Tessile
    • Metallo
    • Arredamenti
    • Alimentare
    • Birrificio
    • Ditta di regalistica aziendale
    Benessere e sport
    • Club sportivo
    • Negozio di ottica
    • Centro fitness
    • Centro benessere
    • Farmacia
    • Parrucchiere
    Commercio
    • Tuttofare
    • Hardware e assistenza IT
    • Ditta di installazione di pannelli solari
    • Calzolaio
    • Servizi di pulizia
    • Servizi di climatizzazione
    Altro
    • Organizzazione non profit
    • Ente per la tutela ambientale
    • Agenzia di cartellonistica pubblicitaria
    • Studio fotografico
    • Punto noleggio di biciclette
    • Rivenditore di software
    Carica tutti i settori
  • Community
    Apprendimento
    • Tutorial
    • Documentazione
    • Certificazioni 
    • Formazione
    • Blog
    • Podcast
    Potenzia la tua formazione
    • Programma educativo
    • Scale Up! Business Game
    • Visita Odoo
    Ottieni il software
    • Scarica
    • Versioni a confronto
    • Note di versione
    Collabora
    • Github
    • Forum
    • Eventi
    • Traduzioni
    • Diventa nostro partner
    • Servizi per partner
    • Registra la tua società di contabilità
    Ottieni servizi
    • Trova un partner
    • Trova un contabile
    • Incontra un esperto
    • Servizi di implementazione
    • Testimonianze dei clienti
    • Supporto
    • Aggiornamenti
    GitHub Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Richiedi una demo
  • Prezzi
  • Aiuto
È necessario essere registrati per interagire con la community.
Tutti gli articoli Persone Badge
Etichette (Mostra tutto)
odoo accounting v14 pos v15
Sul forum
È necessario essere registrati per interagire con la community.
Tutti gli articoli Persone Badge
Etichette (Mostra tutto)
odoo accounting v14 pos v15
Sul forum
Assistenza

Hide "My Profile" menu from specific users in Odoo 17

Iscriviti

Ricevi una notifica quando c'è un'attività per questo post

La domanda è stata contrassegnata
settingsdashboardaccess_rules
2 Risposte
707 Visualizzazioni
Avatar
Abdallah Mahmoud

Hello everyone,

I am working with Odoo 17 and I would like to know if it is possible to hide the "My Profile" menu (from the user dropdown in the top-right corner) for specific users.

My goal is to prevent certain users from accessing their profile from this menu.

I have noticed that the view used when opening "My Profile" from the top menu is different from the one used when accessing the user form from the Settings menu, even though both are based on the same model (res.users).

So my questions are:

  • Is there a way to hide or restrict access to the "My Profile" menu for specific users?
  • Why does Odoo use a different view in this case?
  • What would be the best approach to control this behavior (security rules, view customization, or overriding the action)?

Any guidance would be appreciated.

Thank you!

0
Avatar
Abbandona
Codesphere Tech

Hello,
You can patch the UserMenu and remove items based on condition.

You can refer this free app: https://apps.odoo.com/apps/modules/17.0/cst_hide_user_submenus
Hope this helps
Thanks

Avatar
Jainesh Shah(Aktiv Software)
Risposta migliore

Hello Abdallah Mahmoud,


In Odoo 17, the "My Profile" / Preferences menu (top-right user dropdown) is handled by the frontend (OWL) and not purely by backend views or record rules. That’s why controlling it requires a different approach.


✅ Answers to Your Questions

1. Is it possible to hide "My Profile" for specific users?

Yes, it is possible — but not using standard XML views or record rules.

You need to patch the UserMenu (OWL component) and control visibility using a security group.

2. Why does Odoo use a different view?

Although both use the res.users model:

  • Top-right menu (Preferences / My Profile) → triggered via frontend JS (OWL component)
  • Settings → Users → standard backend form view (XML)

So the difference comes from:

  • Frontend-driven action vs backend action
  • Different context and rendering layers
3. Best approach to control this?

The recommended approach is:

  • Create a security group
  • Patch the UserMenu component
  • Hide menu items conditionally based on user group

💡 Working Solution

🔹 Step 1: Create Security Group
<record id="group_hide_user_menu" model="res.groups">
    <field name="name">Hide User Menu Items</field>
    <field name="category_id" ref="base.module_category_hidden"/>
</record>
🔹 Step 2: Patch UserMenu (JavaScript)

📁 your_module/static/src/js/user_menu_patch.js

/** @odoo-module **/

import { UserMenu } from "@web/webclient/user_menu/user_menu";
import { patch } from "@web/core/utils/patch";
import { onWillStart } from "@odoo/owl";

const HIDDEN_IDS = [
    "settings",   // Preferences (My Profile)
];

const RESTRICT_GROUP = "your_module.group_hide_user_menu";

patch(UserMenu.prototype, {
    setup() {
        super.setup(...arguments);
        this.hideMenuItems = false;

        onWillStart(async () => {
            this.hideMenuItems = await this.user.hasGroup(RESTRICT_GROUP);
        });
    },

    getElements() {
        const elements = super.getElements(...arguments);
        if (this.hideMenuItems) {
            return elements.filter((el) => {
                if (el.type === "separator") return false;
                return !HIDDEN_IDS.includes(el.id);
            });
        }
        return elements;
    },
});
🔹 Step 3: Load the JS

Make sure to load this JS file in backend assets (web.assets_backend) of your module.



If you have any questions, feel free to reach out.

Hope this helps!

 

Thanks and Regards,

Email: odoo@aktivsoftware.com

0
Avatar
Abbandona
Avatar
Zehntech Technologies Inc.
Risposta migliore

Hello, 

In standard Odoo 17, there is no direct configuration to hide the “My Profile” menu for specific users, as it is part of the core user dropdown and accessible to all logged-in users by default.

However, you can achieve this through customization:

  • UI Customization (JS/XML): Hide the menu item based on user groups.
  • Access Control: Restrict write access on res.users to prevent users from modifying their own profile (even if they access it).
  • Action/View Override: Customize the action linked to “My Profile” to control behavior or redirect access.

Regarding your observation — Odoo uses a different view for “My Profile” to provide a simplified, user-friendly interface compared to the full user form available in Settings.

The best approach typically combines UI hiding (for better UX) and access rights (for security enforcement).

Hope this works for you! If you need any help implementing this or want a more optimized approach, feel free to reach out for further discussion

Regards,

Zehntech Technologies Inc.

santosh.sekwadia@zehntech.com

0
Avatar
Abbandona
Ti stai godendo la conversazione? Non leggere soltanto, partecipa anche tu!

Crea un account oggi per scoprire funzionalità esclusive ed entrare a far parte della nostra fantastica community!

Registrati
Post correlati Risposte Visualizzazioni Attività
Odoo14 accounting advisor cannot update currency
settings permissions access_rules v14
Avatar
0
ott 21
3608
USUARIO DE LECTURA - ODOO
settings
Avatar
Avatar
Avatar
3
apr 26
2121
Fiscal localizations
settings
Avatar
Avatar
2
apr 25
12463
Where is the "Translated Terms" Menu in Odoo 16? Risolto
settings
Avatar
Avatar
Avatar
Avatar
Avatar
5
mar 25
23590
Get Blanked after define simple dashboard
dashboard
Avatar
Avatar
1
ago 24
3517
Community
  • Tutorial
  • Documentazione
  • Forum
Open source
  • Scarica
  • Github
  • Runbot
  • Traduzioni
Servizi
  • Hosting Odoo.sh
  • Supporto
  • Aggiornamenti
  • Sviluppi personalizzati
  • Formazione
  • Trova un contabile
  • Trova un partner
  • Diventa nostro partner
Chi siamo
  • La nostra azienda
  • Branding
  • Contattaci
  • Lavora con noi
  • Eventi
  • Podcast
  • Blog
  • Clienti
  • Note legali • Privacy
  • Sicurezza
الْعَرَبيّة 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 Svenska ภาษาไทย Türkçe українська Tiếng Việt

Odoo è un gestionale di applicazioni aziendali open source pensato per coprire tutte le esigenze della tua azienda: CRM, Vendite, E-commerce, Magazzino, Produzione, Fatturazione elettronica, Project Management e molto altro.

Il punto di forza di Odoo è quello di offrire un ecosistema unico di app facili da usare, intuitive e completamente integrate tra loro.

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