Se rendre au contenu
Odoo Menu
  • Se connecter
  • Essai gratuit
  • Applications
    Finance
    • Comptabilité
    • Facturation
    • Notes de frais
    • Feuilles de calcul (BI)
    • Documents
    • Signature
    Ventes
    • CRM
    • Ventes
    • PdV Boutique
    • PdV Restaurant
    • Abonnements
    • Location
    Sites web
    • Site Web
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Chaîne d'approvisionnement
    • Inventaire
    • Fabrication
    • PLM
    • Achats
    • Maintenance
    • Qualité
    Ressources Humaines
    • Employés
    • Recrutement
    • Congés
    • Évaluations
    • Recommandations
    • Parc automobile
    Marketing
    • Marketing Social
    • E-mail Marketing
    • SMS Marketing
    • Événements
    • Marketing Automation
    • Sondages
    Services
    • Projet
    • Feuilles de temps
    • Services sur Site
    • Assistance
    • Planification
    • Rendez-vous
    Productivité
    • Discussion
    • Validations
    • Internet des Objets
    • VoIP
    • Connaissances
    • WhatsApp
    Applications tierces Odoo Studio Plateforme Cloud d'Odoo
  • Industries
    Commerce de détail
    • Librairie
    • Magasin de vêtements
    • Magasin de meubles
    • Épicerie
    • Quincaillerie
    • Magasin de jouets
    Food & Hospitality
    • Bar et Pub
    • Restaurant
    • Fast-food
    • Maison d’hôtes
    • Distributeur de boissons
    • Hôtel
    Immobilier
    • Agence immobilière
    • Cabinet d'architecture
    • Construction
    • Gestion immobilière
    • Jardinage
    • Association de copropriétaires
    Consultance
    • Cabinet d'expertise comptable
    • Partenaire Odoo
    • Agence Marketing
    • Cabinet d'avocats
    • Aquisition de talents
    • Audit & Certification
    Fabrication
    • Textile
    • Métal
    • Meubles
    • Alimentation
    • Brewery
    • Cadeaux d'entreprise
    Santé & Fitness
    • Club de sports
    • Opticien
    • Salle de fitness
    • Praticiens bien-être
    • Pharmacie
    • Salon de coiffure
    Trades
    • Bricoleur
    • Matériel informatique et support
    • Systèmes photovoltaïques
    • Cordonnier
    • Services de nettoyage
    • Services CVC
    Autres
    • Organisation à but non lucratif
    • Agence environnementale
    • Location de panneaux d'affichage
    • Photographie
    • Leasing de vélos
    • Revendeur de logiciel
    Browse all Industries
  • Communauté
    Apprenez
    • Tutoriels
    • Documentation
    • Certifications
    • Formation
    • Blog
    • Podcast
    Renforcer l'éducation
    • Programme éducatif
    • Business Game Scale-Up!
    • Rendez-nous visite
    Obtenir le logiciel
    • Téléchargement
    • Comparez les éditions
    • Versions
    Collaborer
    • Github
    • Forum
    • Événements
    • Traductions
    • Devenez partenaire
    • Services for Partners
    • Enregistrer votre cabinet comptable
    Nos Services
    • Trouver un partenaire
    • Trouver un comptable
    • Rencontrer un conseiller
    • Services de mise en œuvre
    • Références clients
    • Assistance
    • Mises à niveau
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Obtenir une démonstration
  • Tarification
  • Aide

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

  • CRM
  • e-Commerce
  • Comptabilité
  • Inventaire
  • PoS
  • Projet
  • MRP
All apps
Vous devez être inscrit pour interagir avec la communauté.
Toutes les publications Personnes Badges
Étiquettes (Voir toutl)
odoo accounting v14 pos v15
À propos de ce forum
Vous devez être inscrit pour interagir avec la communauté.
Toutes les publications Personnes Badges
Étiquettes (Voir toutl)
odoo accounting v14 pos v15
À propos de ce forum
Aide

Allow users to change their own data

S'inscrire

Recevez une notification lorsqu'il y a de l'activité sur ce poste

Cette question a été signalée
configurationhr
3 Réponses
938 Vues
Avatar
David Preuss

I have a problem in understanding access rights in Odoo 18 Community. Following is the situation:

I have users that are linked to employees. I want the users to be able to change their own private data for example the emergency contact. 

When activating the option in the employee settings menue, and checking with a test user, I found a few things that I do not understand.

1. The employee can also edit their department, approver etc. which is a bit weird as this is not "their" data.

2. I also saw that the user can change the company details which also seems weird as I don't want a normal employee being able to change contact details or VAT numbers, address of the company (which I guess is related to the standard data that has write permissions for internal users.)

My question is: 

  • What am I misunderstanding or doing wrong possibly?
  • If the behavior is as expected (which I can't seriously believe), how can I restrict access to company details (I tried already removing write access on standard data which did not yield a result) and give write access to own data, basically the tab private information in the users profile but not the work related information?

Thank you for your help

David


0
Avatar
Ignorer
Avatar
Gon Garcia
Meilleure réponse

Hello! until a better answer arrives, I'd suggest checking the permisions at Settings - General settings - "Manage Users" 


through there you can edit "USERS", which is not the same as employees and Contacts.
to give them more or less permissons to edit, you need to check your users and groups access rights. 


Those are a bit tricky. I'd suggest having a look at:
https://www.odoo.com/documentation/18.0/applications/general/users/access_rights.html


0
Avatar
Ignorer
Avatar
Cybrosys Techno Solutions Pvt.Ltd
Meilleure réponse

Hi,


Why employees can edit department, approvers, and company data


* When you give an employee’s user permission to edit their own record, Odoo applies the general “write” rights on the hr.employee model.

* By default, this model has no distinction between private information (emergency contact, bank account, etc.) and work-related information (department, manager, job position). Both are just fields of the same model. That’s why users suddenly see and can edit fields you don’t want them to.

* The same applies to the res.company model: internal users often get write access by default to company contact details, which is why normal employees can change company VAT, phone number, or address.


How to solve it

To achieve your requirement (employees edit their private data, but not work/company details), you need to refine access control:


1- Record Rules:

Create a rule so that employees can only see/write their own employee record (['|',('user_id','=',user.id),('address_home_id.user_id','=',user.id)]).


2- Field-level security (requires customization):

In Odoo Community, you can’t natively restrict editing certain fields only. That feature (field-level ACLs) is more present in Enterprise + Studio. In Community, the workaround is to hide or readonly fields with groups in views.

Example: make the “Department”, “Manager”, “Company” fields attrs="{'readonly': [('id','!=',user.employee_id.id)]}" or restrict with groups_id.


3- Remove company write access:

Go to Settings → Technical → Security → Access Control Lists and adjust permissions on the res.company model so normal employees don’t have write rights. Usually, only “Settings” users should be able to edit company info.



You’re not doing anything wrong, it’s just that Odoo 18 CE doesn’t separate private vs work fields in the hr.employee model. To fix it, you’ll need to add a record rule limiting employees to their own record and adjust views/security groups so they can edit only private fields while company and work-related fields stay read-only.


Hope it helps.

0
Avatar
Ignorer
Avatar
David Preuss
Auteur Meilleure réponse

Dear Gon,

thanks for the advice. This is basically the route that I have taken before. 

The Test User has no rights except his own ones in the profile. Yet he is able to change the mentioned data. The individual access rights and record rules in the groups setting have not been touched by me so far.

Thanks a lot anyway for the URL to the documentation.

0
Avatar
Ignorer
Vous appréciez la discussion ? Ne vous contentez pas de lire, rejoignez-nous !

Créez un compte dès aujourd'hui pour profiter de fonctionnalités exclusives et échanger avec notre formidable communauté !

S'inscrire
Publications associées Réponses Vues Activité
Odoo Integration with Zkteco
configuration hr
Avatar
Avatar
1
nov. 25
274
I can't find hr_payroll in addons when I install Odoo 18 locally Résolu
configuration hr
Avatar
Avatar
1
avr. 25
1404
Automating Attendance Correction by Manager
configuration hr
Avatar
0
nov. 24
1313
Managing default users' permissions v16 - v18
configuration hr service
Avatar
0
avr. 25
17
Linking employees to user accounts Résolu
configuration accounting hr
Avatar
Avatar
1
mars 25
2057
Communauté
  • Tutoriels
  • Documentation
  • Forum
Open Source
  • Téléchargement
  • Github
  • Runbot
  • Traductions
Services
  • Hébergement Odoo.sh
  • Assistance
  • Migration
  • Développements personnalisés
  • Éducation
  • Trouver un comptable
  • Trouver un partenaire
  • Devenez partenaire
À propos
  • Notre société
  • Actifs de la marque
  • Contactez-nous
  • Emplois
  • Événements
  • Podcast
  • Blog
  • Clients
  • Informations légales • Confidentialité
  • Sécurité.
الْعَرَبيّة 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 est une suite d'applications open source couvrant tous les besoins de votre entreprise : CRM, eCommerce, Comptabilité, Inventaire, Point de Vente, Gestion de Projet, etc.

Le positionnement unique d'Odoo est d'être à la fois très facile à utiliser et totalement intégré.

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