work_permit_upload
The binary field with a different template, used for an employee's work permit. Nothing else changes, and on the next branch it does not exist at all.
| Technical name | work_permit_upload |
|---|---|
| Field types | binary |
| Views | form |
| Module | hr, the Employees app |
| Used in core | The work permit field on the employee form in hr |
| Versions | Odoo 19.0, Odoo 18.0, Odoo 17.0, Odoo 16.0 |
| No-code setup | No. It is set in view XML and depends on module-specific data |
| Alternatives | binary, many2many_binary, pdf_viewer, image |
What the work permit upload does
What this means for your team
Supported options in Odoo 19
| Option | Type | What it does |
|---|---|---|
filename | string (attribute) | Inherited from the binary field. Names the companion field holding the uploaded file's name. |
accepted_file_extensions | string | Inherited. Restricts what the upload control accepts. |
Nothing is lost. The descriptor is spread without replacing the extractor, so every option and attribute the binary field reads continues to work, including the file name attribute.
Working examples
One line, and what it does not break
Version compatibility
| Version | Status | Notes |
|---|---|---|
| Odoo 20.0 | In development | Not released. No registration under this name on the development branch. |
| Odoo 19.0 | Verified | Verified against the shipped source. |
| Odoo 18.0 | Verified | Same one-line implementation. |
| Odoo 17.0 | Verified | Same implementation with older component conventions. |
| Odoo 16.0 | Verified | Same implementation with older component conventions. |
Upgrade note. The widget has been present since Odoo 16 with the same implementation, so nothing needs attention within that range. Going to the next version, the name no longer resolves, and a view still using it would fall back to the plain binary field.
What is changing in Odoo 20
Common problems and fixes
| Symptom | Cause and fix |
|---|---|
| The control looks generic | The widget name did not resolve, so the field fell back to the plain binary widget. Check the module is installed and, on the next version, that the widget still exists. |
| The file name is empty | The companion field named by the filename attribute is missing. Add it, invisible is enough. |
| Any file type is accepted | No accepted extensions option is set. Set it in the field's options; the inherited option works normally. |
| An option stopped working | It should not; the extractor is untouched. Check the option spelling against the binary field. |
| It disappeared after upgrading | The widget is removed on the development branch. Use the plain binary field or whatever the new employee form provides. |
| Missing widget error | The employees module is not installed in that database. Install Employees, or use the plain binary field. |
Work permit upload vs the alternatives
| Widget | Best for | Key difference |
|---|---|---|
work_permit_upload | The work permit document on an employee form | The binary field with its own template and every inherited option intact |
| binary | Any single file | The generic presentation, and what this falls back to |
| many2many_binary | Several documents | A list rather than one file |
| pdf_viewer | Reading the document inline | A preview rather than an upload control |
| image | A scanned permit shown as a picture | Image rendering with sizing options |
Frequently asked questions
What does this widget change?+
Do the binary field's options still work?+
Why does it exist at all?+
Does it exist in Odoo 20?+
Is losing it a functional problem?+
HR records that stay compliant without chasing
Work permits, contracts and expiry tracking are obligations with dates attached, and the reminders matter as much as the fields. We implement Odoo HR and its compliance workflows on versions 16 through 19.
Book a free consultation