Skip to main content
iVentureTeam

week_days

The row of seven weekday checkboxes on Odoo's recurrence forms is the week_days view widget. It demands seven exact boolean fields on the model, and it reorders itself by the user's locale.

Siddharth JambukiyaSiddharth JambukiyaOdoo Techno-Functional Consultant
August 26, 2026Updated August 26, 20265 min read
Technical nameweek_days
Viewsform (view widget, element)
Moduleweb, present in every Odoo database
Used in core2 occurrences in lunch: the supplier form and the alert form
VersionsOdoo 20.0, Odoo 19.0, Odoo 18.0, Odoo 17.0, Odoo 16.0
No-code setupNo. The widget is placed in view XML; Studio has no weekday row component
Alternativesday_selection, many2many_checkboxes, calendar_week_days

What the week days widget does

Recurring schedules need a compact way to answer one question: which days of the week does this apply to? Odoo's answer is week_days, a view widget that renders a single-row table with a header of weekday names and a checkbox under each.

It is deliberately rigid. The widget declares fieldDependencies for seven boolean fields with fixed names, sun through sat, which means the model behind the view must define exactly those fields. In exchange, the view XML stays a one-liner: the dependencies make the ORM load the seven fields automatically, so you do not add them to the arch yourself. In core it powers the lunch app's supplier availability and alert schedule.

What this means for your team

Weekday patterns show up everywhere operations meet a calendar: which days a supplier delivers, which days an alert fires, which days a shift or service runs. Storing them as seven booleans keeps the data model trivially filterable, and this widget keeps the UI honest, seven checkboxes users cannot mistype, instead of a free-text field like Mon-Wed-Fri that no one can query.

The locale-aware ordering is a small detail with real effect for international teams: the same form shows Sunday first to a US user and Monday first to a Belgian one, matching how each reads a week. Nobody configures that; it follows the language settings automatically.

Working examples

How core places it (lunch supplier)

<label for="sun" class="d-none"/>
<field name="sun" invisible="1"/>
<widget name="week_days"/>

From lunch_supplier_views.xml. The invisible field and hidden label are only there to give the group a label anchor; the widget itself loads all seven fields through its dependencies.

Using it on a custom model

# model: seven booleans with the exact names
sun = fields.Boolean()
mon = fields.Boolean()
# ... tue, wed, thu, fri, sat
<widget name="week_days"/>

That is the whole integration: fields with the right names, one widget element in the form.

Locale rotation and the calendar sibling

The ordering logic is one line worth understanding. The component keeps a fixed array starting at Sunday and rotates it by localization.weekStart % 7, the week-start value Odoo derives from the user's language. The header labels are not hardcoded either; each column prints record.fields[day].string, so relabeling a field in Python, or translating it, changes the column header automatically.

Editing goes through record.update({ day: checked }) per click: the form becomes dirty and standard save or discard semantics apply, and readonly on the view disables every checkbox. The calendar module demonstrates the intended extension path: CalendarWeekDays subclasses the component, swaps the template, reuses the same fieldDependencies, and registers under its own name calendar_week_days for event recurrence, where clicking the day label itself toggles the value.

Version compatibility

VersionStatusNotes
Odoo 20.0In developmentNot released. The development branch shows only the Owl props migration; see below.
Odoo 19.0VerifiedVerified against the shipped source.
Odoo 18.0VerifiedSame widget and dependencies. No XML changes needed.
Odoo 17.0VerifiedSame behavior; the calendar_week_days sibling appears alongside it.
Odoo 16.0VerifiedSame widget with the older class-level fieldDependencies declaration.

Upgrade note. Views using week_days carry over unchanged from 16 through 19. Only JavaScript that patched the component needs review: 16 declared fieldDependencies as an object on the class, while 17 and later use the array form on the registration descriptor.

What is changing in Odoo 20

Odoo 20 is expected at Odoo Experience in Brussels, 24 to 26 September 2026. We read the widget's file on the public development branch at the time of writing; the branch is unstable and this page will be re-verified after release.

No functional changes: the seven dependencies, the locale rotation and the registration are identical to Odoo 19. The only movement is the migration to the new Owl typed-props syntax, which affects JavaScript patches and nothing in XML.

Common problems and fixes

SymptomCause and fix
The form crashes or the row renders empty on a custom modelOne or more of the seven required boolean fields (sun through sat) is missing on the model. Add all seven booleans with the exact names; the widget injects them into the view automatically.
Days appear in the wrong order for some usersThe order is rotated by the user's locale week start, not fixed. This is by design; check the user's language settings if the rotation looks wrong.
Column headers show technical-looking labelsHeaders print each field's string attribute from the model definition. Set proper field strings in Python or translate them; the widget picks them up.
Checkbox clicks do not persistThe widget only updates the record in memory; it never saves. Save the form; each click marks it dirty like any field edit.
Checkboxes are not clickableThe widget is in a readonly context; readonly disables every checkbox. Check form-level or record-level readonly conditions.

Week days widget vs the alternatives

WidgetBest forKey difference
week_daysA which-days-of-the-week pattern stored as seven booleansView widget with hardwired field names and locale-aware column order
day_selectionPicking one day of the month paired with a month fieldA selection dropdown driven by a month attribute, not seven booleans
many2many_checkboxesCheckbox lists backed by real relational recordsWorks on a many2many of any model; day rows would be records, not booleans
calendar_week_daysEvent recurrence days in the Calendar appSubclass of this widget with its own template and label-click toggling

Pick by data shape: seven booleans with fixed names is this widget; a single selection or many2many of days calls for the generic selection and tag widgets instead.

Frequently asked questions

Can I point week_days at differently named fields?+
No. The seven names sun through sat are hardcoded in the widget's fieldDependencies and in its data getter. Rename your fields or subclass the component like calendar_week_days does.
Do I need to add the seven fields to the view XML?+
No. fieldDependencies makes the framework load them automatically wherever the widget is placed. Core's lunch views only add sun invisibly to anchor a label.
Why does the row start with Monday for some users and Sunday for others?+
The widget rotates its fixed Sunday-first array by localization.weekStart, which Odoo derives from the user's language. It is per-user and not configurable on the widget.
Is week_days a field widget or a view widget?+
A view widget: it is written as <widget name="week_days"/>, has no value of its own, and edits the seven boolean fields directly through the record.
What is calendar_week_days and when would I see it?+
It is the Calendar app's subclass of this widget, registered under its own name, with a template where clicking a day toggles it. Odoo uses it in event recurrence settings from version 17 on.
Does checking a day save immediately?+
No. Each click calls record.update, which only marks the form dirty. The values persist when the user saves, and discard reverts them, exactly like normal field edits.

Building recurring schedules into your Odoo apps?

Weekday patterns, supplier availability windows and recurring alerts all hinge on getting the data model right before the widget ever renders. We design and build these scheduling flows in custom Odoo modules, reusing core widgets like week_days so upgrades stay painless.

Plan your scheduling feature with us

How this page was produced

The dependency list, ordering logic and template were read from week_days.js and week_days.xml in the Odoo 19.0 web module, compared against 16.0 through 18.0 and the development branch, and the core usages were verified in the lunch view XML. Spotted an error? Tell us and we will correct the page.