project_task_progressbar
The bar that shifts from green to orange to red as a task eats its allocated hours is project_task_progressbar: a fork of the standard progress bar that multiplies by 100 and colors itself by fixed thresholds.
| Technical name | project_task_progressbar |
|---|---|
| Field types | float (a 0 to 1 fraction), integer |
| Views | list, form |
| Also registered as | also in the formatters registry (percentage formatting for aggregations) |
| Module | hr_timesheet (Timesheets) |
| Used in core | 5 occurrences across 1 module: task lists and task sharing views in hr_timesheet |
| Versions | Odoo 20.0, Odoo 19.0, Odoo 18.0, Odoo 17.0 |
| No-code setup | No: it is wired to the task progress field in XML |
| Alternatives | progressbar, percentage, percentpie |
What the Task Progress Bar widget does
What this means for your team
Supported options in Odoo 19
| Option | Type | What it does |
|---|---|---|
overflow_class | string | Inherited. Bootstrap class applied when the value exceeds the maximum. Core's task views pass bg-danger, which is where the red comes from; omitted, overruns render gray.(default: bg-secondary) |
max_value | field name (integer/float) | Inherited. A field holding the bar's maximum, displayed next to the bar when set. On this widget remember the comparison uses the x100-scaled current value.(default: 100) |
current_value | field name (integer/float) | Inherited. Displays a different field's value on the bar than the one the widget is placed on. The x100 override applies to whichever field is displayed. |
editable | boolean | Inherited, but hazardous here: the display is scaled x100 while the parser writes raw input back, so typing the displayed number stores 100 times the intended fraction. Core never enables it on this widget. |
edit_max_value | boolean | Inherited. With editable, switches editing to the max value field instead of the current value. |
Think twice before setting editable on this widget. The display multiplies by 100 but the inherited parser does not divide back: the input shows 45, and a user retyping 45 would store 45, not 0.45. Core never enables editing here, and neither should you; edit the underlying hours, not the computed fraction.
Working examples
Reading the threshold logic exactly
Version compatibility
| Version | Status | Notes |
|---|---|---|
| Odoo 20.0 | In development | Not released. This file is byte-identical on the development branch, but the base progressbar it spreads loses options there; see below. |
| Odoo 19.0 | Verified | Verified against the shipped source; byte-identical to 18.0. |
| Odoo 18.0 | Verified | Adds the x100 scaling and the percentage formatter registration. |
| Odoo 17.0 | Partial / changed | Exists with threshold colors but without the x100 scaling or formatter; displays the raw fraction. |
| Odoo 16.0 | Not available | Does not exist. |
Upgrade note. In Odoo 17 the widget existed without the x100 scaling and without the formatter registration; it displayed the raw fraction and relied on the surrounding view for percentage semantics. From 18 the scaling is built in, so custom views that pre-multiplied their field by 100 for 17 will display 10,000-style values after upgrading: store fractions and let the widget scale.
What is changing in Odoo 20
Common problems and fixes
| Symptom | Cause and fix |
|---|---|
| The bar shows 4500% or similar | The field stores percentages (45) while the widget multiplies by 100 expecting fractions (0.45). Store the fraction in the field; the widget owns the scaling since Odoo 18. |
| The bar column is empty for most tasks | Progress computes from allocated hours; tasks without an estimate have nothing to divide by. Set allocated hours on tasks (and make estimation part of the team's definition of ready). |
| Overruns show gray instead of red | The overflow class defaults to bg-secondary; the red in core comes from the view passing overflow_class. Add options="{'overflow_class': 'bg-danger'}" on the field. |
| You need orange to start at 60 instead of 80 | The 80 and 100 thresholds are hardcoded in the color getter. Extend the widget in JavaScript and override progressBarColorClass; it is a five-line patch. |
| Editing the bar writes absurd values | The editable option round-trips asymmetrically on this widget: display is x100, the parser is not. Keep the bar read-only and let users edit the underlying hours fields instead. |
| Missing widget warning outside project contexts | The widget ships with hr_timesheet. Add hr_timesheet as a dependency or fork the small widget into your module. |
Task Progress Bar widget vs the alternatives
| Widget | Best for | Key difference |
|---|---|---|
project_task_progressbar | A 0 to 1 fraction that should traffic-light itself at 80 and 100 percent | Multiplies by 100 for display and hardcodes green, orange, then overflow coloring |
| progressbar | Progress against a real max field, values already scaled | No scaling, primary blue until overflow, optionally editable |
| percentage | Showing the same fraction as a compact number | Formats fractions as percent text; no bar, no thresholds |
| percentpie | A circular gauge on dashboard-style views | Expects 0 to 100 values, the opposite scaling convention from this widget |
Frequently asked questions
When does the Odoo task progress bar turn orange and red?+
Why does my custom field render a 4500% bar?+
Can I change the 80 percent threshold?+
Why is my overrun gray instead of red?+
Does the bar work in pivots too?+
Why is the progress column empty on my tasks?+
Projects that warn you at 80 percent, not 120?
The bar only works if timesheets are filled, tasks are estimated, and managers trust the numbers. We roll out Odoo Project and Timesheets with the habits attached: estimation flows, approval chains and the reports that catch overruns while there is still budget to act.
Get our timesheets under control