rotting_statusbar_duration
The rotting_statusbar_duration widget is the Odoo 19 form statusbar that shows how long a record spent in each stage and warns, on hover, when the record has gone stale.
| Technical name | rotting_statusbar_duration |
|---|---|
| Field types | many2one (stage field) |
| Views | form |
| Module | mail, shipped with every Odoo database |
| Used in core | 3 occurrences across 3 modules: crm, hr_recruitment, project |
| Versions | Odoo 20.0, Odoo 19.0 |
| No-code setup | No. Stage thresholds are no-code, but placing the widget needs XML |
| Alternatives | statusbar, rotting, badge_rotting |
What the rotting statusbar does
What this means for your team
Supported options in Odoo 19
| Option | Type | What it does |
|---|---|---|
clickable | boolean | Inherited from statusbar. When true, clicking a stage arrow moves the record to that stage and saves. Core CRM sets it explicitly.(default: true) |
fold_field | field name | Inherited from statusbar. Boolean field on the stage model marking stages that collapse behind the ellipsis, typically fold. |
One knob is an attribute, not an option. Which stages are always visible on the bar is controlled by statusbar_visible="draft,posted" on the field element, inherited from the base statusbar. And one dependency is silent: the tooltip reads rotting_days from the record without declaring it, so the form must include that field, invisible is fine, for the day count to be correct. duration_tracking, by contrast, is a declared dependency and loads automatically.
Working examples
Durations, tooltips, and the layer that actually rots
Version compatibility
| Version | Status | Notes |
|---|---|---|
| Odoo 20.0 | Partial / changed | Not released. Same file and name, but the inherited duration logic gains live ticking and switches units. See below. |
| Odoo 19.0 | Verified | Introduced in 19.0 with the rotting family, on top of the existing statusbar_duration. |
| Odoo 18.0 | Not available | Does not exist; statusbar_duration provides durations without rot alerts. |
| Odoo 17.0 | Not available | Does not exist; statusbar_duration provides durations without rot alerts. |
| Odoo 16.0 | Not available | Does not exist, and duration_tracking itself is not available either. |
Upgrade note. The widget is new in Odoo 19. Forms upgraded from 18 keep working with statusbar or statusbar_duration; switching the stage field to rotting_statusbar_duration is a one-attribute change once the model rots.
What is changing in Odoo 20
Common problems and fixes
| Symptom | Cause and fix |
|---|---|
| No durations under any stage name | The model lacks mail.tracking.duration.mixin, or _track_duration_field points at a different field than the widget is on. Add the mixin and set _track_duration_field to the stage field. |
| Tooltip says the record is stuck for undefined days | rotting_days is not loaded in the form; the widget reads it without declaring a dependency. Add rotting_days to the form, invisible="1" is enough. |
| No rot highlight although the record is old | The stage's rotting_threshold_days is 0, or the model's rotting domain excludes the record, as CRM does for won leads. Set the threshold on the stage and check _get_rotting_domain overrides. |
| Users change stages by clicking the bar and should not | clickable defaults to true. Set options="{'clickable': False}". |
| Some stages never show on the bar | They are folded via fold_field, or statusbar_visible lists only a subset; the current stage always shows regardless. Adjust the fold flags on the stages or the statusbar_visible attribute. |
| Widget refuses a selection field | The duration layer narrows supportedTypes to many2one, unlike plain statusbar. Use statusbar for selection-based states. |
Rotting statusbar vs the alternatives
| Widget | Best for | Key difference |
|---|---|---|
rotting_statusbar_duration | Pipeline form headers that should show time in stage and rot alerts | Statusbar plus durations plus the stuck-record tooltip, many2one stages only |
| statusbar | Plain stage bars without time tracking | No durations, no rot state, also works on selection fields |
| rotting | The rot flag on kanban cards | Day pill only, registered for kanban views |
| badge_rotting | The rot flag in list views | Many2one stage cell with an appended day pill |
Frequently asked questions
What is the difference between statusbar_duration and rotting_statusbar_duration?+
Where do the times under the stage names come from?+
Does rotting_statusbar_duration work on selection fields?+
Can I use it on my own model?+
Why does the tooltip show the wrong number of days?+
What changes for this widget in Odoo 20?+
Stage bars that report time, not just state
We enable duration tracking and rot alerts on custom pipelines, from helpdesk queues to production stages, and we handle the duration_tracking contract change coming with Odoo 20 so your patched statusbars do not break. If your team argues about where deals stall, put the answer in the form header.
Plan my statusbar upgrade