Skip to main content
iVentureTeam

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.

Siddharth JambukiyaSiddharth JambukiyaOdoo Techno-Functional Consultant
August 27, 2026Updated August 28, 20264 min read
Technical namework_permit_upload
Field typesbinary
Viewsform
Modulehr, the Employees app
Used in coreThe work permit field on the employee form in hr
VersionsOdoo 19.0, Odoo 18.0, Odoo 17.0, Odoo 16.0
No-code setupNo. It is set in view XML and depends on module-specific data
Alternativesbinary, many2many_binary, pdf_viewer, image

What the work permit upload does

An employee's work permit is a document with an expiry date and a compliance meaning, and it sits on the employee form among fields that are mostly text. Rendering it as a generic file input makes it look like an afterthought.

This widget gives it its own presentation. It is the standard binary file field with a different template, so the upload control looks like part of the HR form rather than a generic attachment box.

Nothing else is changed. The uploading, the clearing and the file name handling are all inherited, which is why the file is four lines long.

What this means for your team

Work permit tracking is a compliance obligation in most jurisdictions, and the practical failure is not usually a missing feature but a form nobody fills in. Presentation is a real part of that: a field that looks like it belongs gets completed more often than one that looks bolted on.

The thing to plan for is the removal. The widget is absent from the development branch, which means the work permit presentation is being reworked. If your HR process depends on that field's appearance or on a customization of it, that is a change to check before upgrading.

Supported options in Odoo 19

The widget declares no options of its own and spreads the binary field's descriptor, so everything below is inherited and behaves normally. Read from work_permit_upload.js, Odoo 19.0.

OptionTypeWhat it does
filenamestring (attribute)Inherited from the binary field. Names the companion field holding the uploaded file's name.
accepted_file_extensionsstringInherited. 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

The usual usage

<field name="work_permit"
       widget="work_permit_upload"
       filename="work_permit_name"/>

The file name attribute works exactly as on a plain binary field.

Restricting the file type

<field name="work_permit"
       widget="work_permit_upload"
       options="{'accepted_file_extensions': '.pdf,.png,.jpg'}"/>

Inherited from the binary field and unaffected by the template substitution.

The plain binary field

<field name="work_permit" widget="binary"/>

Identical behavior with the generic presentation.

One line, and what it does not break

There is one line of substance: a subclass naming a different template. The descriptor spreads the binary field's and swaps in that component.

Because the extractor is untouched, everything the binary field reads still reaches the component: the file name attribute, the accepted extensions option and the rest. That is worth contrasting with widgets elsewhere in Odoo that replace both a template and the extractor and silently lose the inherited configuration.

Everything visible, the layout of the upload control and whatever wording surrounds it, lives in the template rather than in this file.

Its removal on the development branch is therefore a statement about the template rather than about behavior: the work permit presentation is being handled differently, and the widget that existed only to name a template is no longer needed.

Version compatibility

VersionStatusNotes
Odoo 20.0In developmentNot released. No registration under this name on the development branch.
Odoo 19.0VerifiedVerified against the shipped source.
Odoo 18.0VerifiedSame one-line implementation.
Odoo 17.0VerifiedSame implementation with older component conventions.
Odoo 16.0VerifiedSame 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

Odoo 20 is expected at Odoo Experience in Brussels, 24 to 26 September 2026. The development branch is unstable and this may still change; we re-verify this page after the release.

The widget is removed. There is no registration under this name on the development branch and the file is absent, so the work permit presentation is being reworked.

Because an unknown widget name falls back to the field's type, a custom employee form still naming it would render a generic file input. That is a cosmetic regression rather than a functional one, but it is worth catching before the upgrade.

Common problems and fixes

SymptomCause and fix
The control looks genericThe 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 emptyThe companion field named by the filename attribute is missing. Add it, invisible is enough.
Any file type is acceptedNo accepted extensions option is set. Set it in the field's options; the inherited option works normally.
An option stopped workingIt should not; the extractor is untouched. Check the option spelling against the binary field.
It disappeared after upgradingThe widget is removed on the development branch. Use the plain binary field or whatever the new employee form provides.
Missing widget errorThe employees module is not installed in that database. Install Employees, or use the plain binary field.

Work permit upload vs the alternatives

WidgetBest forKey difference
work_permit_uploadThe work permit document on an employee formThe binary field with its own template and every inherited option intact
binaryAny single fileThe generic presentation, and what this falls back to
many2many_binarySeveral documentsA list rather than one file
pdf_viewerReading the document inlineA preview rather than an upload control
imageA scanned permit shown as a pictureImage rendering with sizing options

The plain binary field gives identical behavior with the generic presentation, and is what a view falls back to anyway. For several documents rather than one, the attachments widgets are the right choice.

Frequently asked questions

What does this widget change?+
Only the template. Every behavior and every option is inherited from the binary field unchanged, which is why the file is four lines long.
Do the binary field's options still work?+
Yes. The descriptor is spread without replacing the extractor, so the file name attribute and the accepted extensions option both function.
Why does it exist at all?+
To give the work permit its own presentation on the employee form rather than a generic file input, which matters for a field people are meant to complete.
Does it exist in Odoo 20?+
Not on the development branch. There is no registration under this name, so a view still using it falls back to the plain binary field.
Is losing it a functional problem?+
No. The behavior was always the binary field's; only the presentation differs.

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

How this page was produced

The template substitution and the unchanged descriptor were read from work_permit_upload.js on the Odoo 19.0 branch, with the inherited option set read from the binary field in web. Version coverage comes from comparing the file across the 16.0, 17.0 and 18.0 branches, and the removal was verified by searching the public development branch for the registration. Spotted an error? Tell us and we will correct the page.