Sari la conținut
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
    • Artificial Intelligence
    • 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
    • Property Management
    • 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
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Toate postările Oameni Insigne
Etichete (Vezi tot)
odoo accounting v14 pos v15
Despre acest forum
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Toate postările Oameni Insigne
Etichete (Vezi tot)
odoo accounting v14 pos v15
Despre acest forum
Suport

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

Abonare

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

Această întrebare a fost marcată
settingsdashboardaccess_rules
2 Răspunsuri
714 Vizualizări
Imagine profil
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
Imagine profil
Abandonează
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

Imagine profil
Jainesh Shah(Aktiv Software)
Cel mai bun răspuns

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
Imagine profil
Abandonează
Imagine profil
Zehntech Technologies Inc.
Cel mai bun răspuns

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
Imagine profil
Abandonează
Îți place discuția? Nu doar citi, alătură-te!

Creează-ți un cont astăzi pentru a beneficia de funcții exclusive și a interacționa cu minunata noastră comunitate!

Înscrie-te
Postări similare Răspunsuri Vizualizări Activitate
Odoo14 accounting advisor cannot update currency
settings permissions access_rules v14
Imagine profil
0
oct. 21
3612
USUARIO DE LECTURA - ODOO
settings
Imagine profil
Imagine profil
Imagine profil
3
apr. 26
2124
Fiscal localizations
settings
Imagine profil
Imagine profil
2
apr. 25
12472
Where is the "Translated Terms" Menu in Odoo 16? Rezolvat
settings
Imagine profil
Imagine profil
Imagine profil
Imagine profil
Imagine profil
5
mar. 25
23596
Get Blanked after define simple dashboard
dashboard
Imagine profil
Imagine profil
1
aug. 24
3521
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 Svenska ภาษาไทย 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