Skip to main content
iVentureTeam

work_entry_source_field

A radio field that knows one rule: a fully flexible calendar cannot use Working Hours as a work entry source. It warns the user rather than letting the server reject the save.

September 18, 2026Updated September 18, 20263 min read
Technical namework_entry_source_field
Field typesselection
Viewsform
Modulehr_work_entry, installed with Payroll and attendance flows
Used in core0 uses in Odoo 19 Community or Enterprise. Removed in Odoo 20.
VersionsOdoo 19.0
No-code setupNo. There is no Studio entry for this widget.
Alternativesradio, selection, selection_badge

What the work_entry_source_field widget does

The widget extends the standard radio field and adds two getters:

get isFullyFlexible() {
    return !this.props.record.data.resource_calendar_id;
}

get tooltipWarning() {
    return JSON.stringify({
        "text" : _t("Invalid option: For fully flexible calendars, the work entry source cannot be 'Working Hours'."),
    })
}

An employee with no resource_calendar_id has no fixed schedule, so there are no working hours for a work entry to be generated from. The widget detects that and surfaces a warning.

It declares the calendar as a field dependency, which means the check works even when that field is not placed on the form. The dependency is fetched for the widget's own use.

What this means for your team

This is a small but instructive piece of design. The rule it encodes is a payroll rule, and payroll rules are exactly the kind that produce a confusing server error at save time if the interface does not mention them.

Rather than blocking the option or throwing, the widget warns. The user can still see the choice and understand why it will not work, which is usually better than an option that silently vanishes.

If you build payroll or attendance screens, that pattern is worth keeping even though the widget is not.

Working examples

On a work entry source field in Odoo 19:

<field name="work_entry_source" widget="work_entry_source_field"/>

The employee's calendar does not need to be on the form, because the widget declares it as a dependency:

fieldDependencies: [
    { name: "resource_calendar_id", type: "many2one", relation: "resource.calendar" },
],

Version compatibility

VersionStatusNotes
Odoo 19.0VerifiedVerified against the shipped 19.0 source. Inherits radio's options.
Odoo 20.0Not availableRemoved. work_entry_type_badge is a different widget, not a replacement.

Present in Odoo 19, removed in Odoo 20.

What is changing in Odoo 20

Removed. The registration is absent from the 20.0 branch.

Odoo 20 does register a work_entry_type_badge widget in the same area, but it is not a replacement: it renders a work entry type as a badge rather than offering a source choice with a validity warning. Treat it as a neighboring widget, not a migration target.

If the flexible-calendar rule matters to your payroll setup, the warning has to move somewhere. A Python constraint will enforce it at save; reproducing the inline warning needs a small custom widget extending radio, which is all this one ever was.

Common problems and fixes

SymptomCause and fix
The warning never appearsThe employee has a working schedule, so the calendar is not fully flexible and the rule does not apply. Expected. The warning is specific to employees with no resource_calendar_id.
The widget stopped resolving after upgrading to Odoo 20The registration was removed. Use the plain radio widget and enforce the rule in a Python constraint.
A user saved an invalid combination anywayThe widget warns but does not block, and it only covers the form. Imports and API writes bypass it entirely. Add a server-side constraint if the rule must be enforced.

Work_entry_source_field widget vs the alternatives

WidgetBest forKey difference
work_entry_source_fieldWarning about an invalid work entry source at entry timeEncodes one payroll rule as a tooltip, and does not exist in Odoo 20
radioThe same choices with no built-in ruleNo warning, and present in every version
selectionA compact dropdown instead of radio buttonsDifferent layout, no rule awareness
selection_badgeChoices rendered as badgesVisual style rather than validation

The plain radio widget renders the same choices without the warning, and is the honest fallback. Where the rule must actually be enforced rather than communicated, a server-side constraint is more reliable than any widget, because it also covers imports and API writes that never touch a form.

Frequently asked questions

What does work_entry_source_field warn about?+
That an employee with no working schedule, meaning no resource_calendar_id, cannot use Working Hours as a work entry source. It shows the warning in a tooltip rather than removing or blocking the option.
Was it removed in Odoo 20?+
Yes. The registration is absent from the 20.0 branch. Odoo 20 has a work_entry_type_badge widget in the same module, but that renders a work entry type as a badge and is not a replacement.
How do I keep the rule on Odoo 20?+
Enforce it with a Python constraint, which also covers imports and API writes that never touch a form. If you want the inline warning too, extend the radio widget in a small custom widget, which is all the original was.

Payroll rules that only surface at save time?

Flexible calendars, work entry sources and attendance rules interact in ways that produce errors nobody can interpret. We build payroll configuration where the rules are enforced server-side and explained in the interface.

Talk to an Odoo consultant

How this page was produced

Verified by reading addons/hr_work_entry/static/src/components/work_entry_source_field/work_entry_source_field.js on the 19.0 branch of a local clone of the official Odoo repository, with both getters and the field dependency quoted above. The removal comes from a registry diff against the 20.0 branch, where work_entry_type_badge was found in the same module and inspected to confirm it is a different widget rather than a rename. Corrections welcome via our contact page.