accrual_levels
Accrual plans are the hardest thing to configure in Odoo Time Off, so Odoo stopped showing them as a list. accrual_levels draws them as a timeline you read like a sentence.
| Technical name | accrual_levels |
|---|---|
| Field types | one2many |
| Views | form |
| Module | hr_holidays, the Time Off app |
| Used in core | 1 occurrence, the accrual plan form in hr_holidays |
| Versions | Odoo 20.0, Odoo 19.0 |
| No-code setup | No. It is a bespoke view widget tied to the accrual plan data model |
| Alternatives | one2many, section_one2many, x2many_buttons |
What the accrual milestones widget does
What this means for your team
Supported options in Odoo 19
| Option | Type | What it does |
|---|---|---|
carryover_day | field dependency | The one field the widget declares as a dependency, so it is loaded even when the form does not show it. Used to build the carry-over date sentence.(since Odoo 19.0) |
id | related field on the milestone | Injected into the related relation so each row exposes its database id, which the widget needs for the server read and for the New badge.(since Odoo 19.0) |
It reads more fields than it declares. The descriptor declares a dependency on carryover_day only, but the component also reads carryover_date and carryover_month from the record to build the carry-over sentence. The core accrual plan form loads all three as visible fields, so this is invisible in practice; on a custom form that omits them, the carry-over line will not render correctly.
Working examples
Why the timeline reads fields your subview never loaded
Version compatibility
| Version | Status | Notes |
|---|---|---|
| Odoo 20.0 | In development | Not released. Behavior unchanged on the development branch; only formatting and reactive-state helpers differ. |
| Odoo 19.0 | Verified | First version. Verified against the shipped source. |
| Odoo 18.0 | Not available | Widget does not exist. Milestones were edited in a conventional embedded list. |
| Odoo 17.0 | Not available | Widget does not exist. |
| Odoo 16.0 | Not available | Widget does not exist. |
Upgrade note. The widget is new in Odoo 19. On Odoo 18 and earlier, accrual plan milestones were edited through a conventional embedded list, so there is nothing to migrate in view XML; a database upgraded from 18 simply gains the timeline with the standard Time Off views.
What is changing in Odoo 20
Common problems and fixes
| Symptom | Cause and fix |
|---|---|
| The timeline does not appear at all | The relation is empty and the core view hides the field in that case. Use the Create a milestone button in the empty-state panel; the timeline appears with the first record. |
| The carry-over sentence is wrong or missing | A custom form does not load carryover_date or carryover_month, neither of which the widget declares as a dependency. Add both fields to the form, invisible if needed. |
| A confirmation dialog appears when clicking a milestone | The plan record has unsaved changes and the widget is asking whether to save them before opening the dialog. Read the choice carefully. Keeping the old version discards the plan edits you just made. |
| A deleted milestone came back | Deleting only removes the row locally; the change is written when the plan is saved. Save the accrual plan after deleting. |
| Day or month names are in the wrong language | They are formatted in the browser using the interface language from context. Change the user's language; the record's language does not drive this text. |
| The New badge stays on an old milestone | The badge marks ids that were not present when the form was first loaded. Reload the form; the id set is recaptured. |
Accrual milestones widget vs the alternatives
| Widget | Best for | Key difference |
|---|---|---|
accrual_levels | Reading and editing time off accrual milestones as plain sentences | Generates a timeline from a second server read, with all editing pushed into a dialog |
| one2many | An ordinary editable list of child records | Shows raw columns; no generated sentences and no save prompt |
| section_one2many | Child lists that need section grouping | Still a list, with structural rows rather than rendered rules |
| x2many_buttons | A compact relation rendered as buttons | Minimal display, no per-row description |
Frequently asked questions
Can I edit a milestone directly on the timeline?+
Why does Odoo ask to save before opening a milestone?+
Does deleting a milestone remove it immediately?+
Does the widget take any options?+
Which Odoo versions have it?+
Accrual rules nobody on your team can read?
Leave policies that only the person who configured them understands are a payroll risk waiting for a resignation letter. We set up and document Odoo Time Off accrual plans so HR can verify them without opening a developer tool.
Book a free consultation