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

[18.0] [Dashboard] How to create a dashboard filter to show data for the current user and their managed users

Abonare

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

Această întrebare a fost marcată
dashboardquickstartQuickstart
1 Răspunde
206 Vizualizări
Imagine profil
Roberto Carlos Osorio (rcar)

Hi everyone,

I’m trying to set up a user-based filter in the dashboard app. Here’s the goal:

  • If the logged-in user is a manager, they should be able to see their own data plus the data of the users they manage.


  • If the logged-in user is a regular team member, they should only see their own data.


How can I configure the filter logic to handle both cases correctly?

0
Imagine profil
Abandonează
Imagine profil
Roberto Carlos Osorio (rcar)
Autor Cel mai bun răspuns

After building your dashboard, you need to create a Relation Filter.

  • Create the filter


    • You can label it however you like.


    • For the related model, select “User”.


  • Set the default value


    • If you want the filter to automatically show data for the current logged-in user, enable the Default Values checkbox.


  • Define the domain (filter logic)


    • The domain controls which records are visible to each user.


    • You’ll need a domain that limits access as follows:


      • Regular users see only their own data.


      • Managers see their own data plus the data of the users they manage.

  • About UID


    • UID stands for User ID — it’s a dynamic variable with the unique identifier of the currently logged-in user.


    • When writing the domain, make sure to enter uid directly in the code editor, as shown in the image example as it currently isn’t possible to add it with the domain editor. You have to be in forum post. 

Explanation:

  • The first condition (user_id = uid) ensures users only see their own data.


  • The second condition allows managers to see both their data and that of the users they manage.


Result

When logged in as a manager, the dashboard allows viewing both the manager’s own data and the data of the users they manage.

In the example below, Ayrton Senna is the manager. The filter lets Senna view his own information as well as the data of the users under his management (such as Charles Leclerc, Checo Perez, and others).

When logged in as a regular user, such as Charles Leclerc, the filter only allows viewing his own data. Other users are not visible in the selection list.

This confirms that the user-based filter works correctly:

  • Managers can access their own and their team’s data.


  • Regular users can only access their personal data.






1
Imagine profil
Abandonează
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
How do I connect the Epson TM-T88VII to Odoo?
quickstart Quickstart
Imagine profil
Imagine profil
2
oct. 25
998
How to Set Customer-Specific Product Names Rezolvat
quickstart Quickstart
Imagine profil
1
nov. 25
1538
✅ Odoo E-commerce: How to discriminate deliveries based on the type of clients
quickstart Quickstart
Imagine profil
0
aug. 25
1513
How can Import an existing Spreadsheets with formulas with out doing it manually? Rezolvat
quickstart Quickstart
Imagine profil
2
aug. 25
1923
Does Odoo manage WebP ? Rezolvat
quickstart Quickstart
Imagine profil
Imagine profil
Imagine profil
3
iul. 25
4643
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