password
The password widget renders a char or text field as a masked input with a reveal button. It is a display convenience, not a security control: the real value is already in the browser.
September 18, 2026Updated September 18, 20264 min read
| Technical name | password |
|---|---|
| Field types | char, text |
| Views | form, list |
| Module | web, present in every Odoo database |
| Used in core | 0 uses in Odoo 19. In Odoo 20 it appears twice, in res_users_views.xml and res_users_identitycheck_views.xml. |
| Versions | Odoo 19.0, Odoo 20.0 |
| No-code setup | No. There is no Studio entry and no options to set. |
| Alternatives | char, password_meter, text |
What the password widget does
What this means for your team
Working examples
Why this widget is not a security control
Version compatibility
| Version | Status | Notes |
|---|---|---|
| Odoo 19.0 | Verified | Verified against the shipped 19.0 source. Unused in standard views. |
| Odoo 20.0 | Verified | Widget unchanged. Now used on two res.users views. |
The widget itself is unchanged between 19.0 and 20.0. What changed is that Odoo started using it.
What is changing in Odoo 20
Common problems and fixes
| Symptom | Cause and fix |
|---|---|
| A placeholder set in options does not appear | placeholder is a field attribute on this widget, not an option. extractProps reads it from the attribute only. Move it out of options: placeholder="..." directly on the field tag. |
| A user revealed a value you expected to be hidden | The reveal button has no permission check, and the value was already sent to the browser. Restrict the field server-side with a groups attribute, or move it behind an access rule. Masking cannot do this. |
| The widget has no effect on an integer or selection field | supportedTypes is char and text only. Check the browser console. Odoo logs a warning for an unsupported type and renders the widget anyway rather than failing. |
Password widget vs the alternatives
| Widget | Best for | Key difference |
|---|---|---|
password | Hiding a credential from a casual onlooker | Visual masking only, with a reveal button anyone can click |
| char | Ordinary short text | No masking and no reveal button |
| password_meter | Showing password strength as the user types | Scores the value rather than hiding it |
| text | Long multi-line values such as private keys | Multi-line, never masked |
Frequently asked questions
Is the Odoo password widget secure?+
How do I add a placeholder to an Odoo password field?+
What field types does the password widget support?+
Does the password widget have any options?+
Credentials on a form that should not be readable?
Masking stops a glance, not a user. If you are storing API keys, portal credentials or license keys in Odoo, the fix is field-level access rules and a server-side story for secrets. We build that, and we audit what your current views are already exposing.
Request a security review