many2one_avatar_employee
The employee picker with a photo: many2one_avatar_employee renders an employee link as an avatar, and quietly enforces HR privacy by switching the model it reads based on the user's rights.
| Studio name | (applied via the widget selector on employee fields) |
|---|---|
| Technical name | many2one_avatar_employee |
| Field types | many2one (hr.employee / hr.employee.public) |
| Views | form, list, kanban, activity |
| Also registered as | kanban.many2one_avatar_employee, activity.many2one_avatar_employee |
| Module | hr (Employees app) |
| Used in core | 59 occurrences across 14 modules, including hr, hr_holidays, hr_attendance, hr_expense, hr_timesheet, hr_skills |
| Versions | Odoo 20.0, Odoo 19.0, Odoo 18.0, Odoo 17.0, Odoo 16.0 |
| No-code setup | Partly: pick the widget on an employee field in Studio's Properties panel |
| Alternatives | many2one_avatar_user, many2many_avatar_employee, many2one_avatar, many2one |
What the avatar employee field does
What this means for your team
Setting it up in Odoo Studio (no code)
What Studio cannot do here
Supported options in Odoo 19
| Option | Type | What it does |
|---|---|---|
relation | string | Pins the model the widget reads. Unset, the source switches per user: hr.employee for HR officers, hr.employee.public for everyone else.(default: auto: hr.employee or hr.employee.public) |
no_open | boolean | Inherited link control with the avatar-family default: unset means clickable in form views only; False forces the link on in lists.(default: unset: link in form view only) |
no_create | boolean | Inherited: removes creation from the dropdown entirely. Quick-create is already disabled by the component; this also removes the Create-and-edit popup path. |
no_create_edit | boolean | Inherited: removes the Create and Edit popup entry. |
search_threshold | number | Inherited: minimum characters before the employee search fires. |
placeholder_field | field name | Inherited: char field supplying a dynamic placeholder. |
The model switch is per user, not per view. Unless relation pins it, HR users search hr.employee while everyone else searches hr.employee.public. If two users report different dropdown contents on the same screen, that is this line of the source, not a caching problem.
Working examples
The hr.employee.public switch
Version compatibility
| Version | Status | Notes |
|---|---|---|
| Odoo 20.0 | In development | Not released. The development branch shows no behavior changes; see below. |
| Odoo 19.0 | Verified | Verified against the shipped source and tested on a clean database. |
| Odoo 18.0 | Verified | Same behavior. No XML changes needed. |
| Odoo 17.0 | Verified | Same behavior. No XML changes needed. |
| Odoo 16.0 | Verified | Same behavior. No XML changes needed. |
Upgrade note. Behavior is stable across Odoo 16 to 19; views carry over. The component moved to composing the shared many2one during this range, so JavaScript patches on old internals need rework, while the registered name and options are unchanged.
What is changing in Odoo 20
Common problems and fixes
| Symptom | Cause and fix |
|---|---|
| Two users see different employees in the same dropdown | The per-user model switch: HR users search hr.employee, others hr.employee.public, each with its own record rules. Expected privacy behavior; pin relation explicitly if one view must behave identically for everyone. |
| No quick-create entry in the dropdown | Hardcoded off in the component; employees should be created in HR, not from a typo. By design; create employees in the Employees app. |
| Avatar not clickable in a list | The inherited form-only link default. Add options="{'no_open': False}". |
| No green presence dot | Presence belongs to the user avatar widget; employees are HR records, not sessions. If presence matters, the field should target users and use many2one_avatar_user. |
| Archived employee shows as blank avatar | The public projection hides what record rules exclude. Restore or reassign the employee; the widget displays what the model exposes. |
Avatar employee field vs the alternatives
| Widget | Best for | Key difference |
|---|---|---|
many2one_avatar_employee | Employee references in HR and custom flows | Privacy switch to hr.employee.public for non-HR users; quick-create disabled |
| many2one_avatar_user | Assignees and anything tied to a login | Targets users; adds presence and the Assign-to-me command |
many2many_avatar_employee | Several employees on one record | Multi-value avatar pills, same employee semantics |
| many2one_avatar | Partners or other records with a photo | Generic avatar display, no HR privacy logic |
many2one | Employee fields where a face adds nothing | Plain text link, standard many2one behavior |
Frequently asked questions
How do I show an employee field with a photo in Odoo?+
Why can't some users see all employees in the dropdown?+
Why is there no quick-create for employees?+
What is the difference between many2one_avatar_employee and many2one_avatar_user?+
How do I make the employee avatar clickable in list views?+
Does the widget work in kanban and activity views?+
HR data on every screen, privacy intact?
Employee pickers on expenses, custom apps and portals only stay compliant when the public-model boundary is respected. We build HR flows on Odoo 16 through 19 that are convenient for users and clean for the privacy audit.
Book a free consultation