subtask_counter
Two numbers on a task row, closed over total, that double as the control for expanding its sub-tasks.
August 27, 2026Updated September 7, 20264 min read
| Technical name | subtask_counter |
|---|---|
| Views | list (view widget, <widget> element) |
| Module | project, the Project app |
| Used in core | The task list in project |
| Versions | Odoo 20.0, Odoo 19.0, Odoo 18.0, Odoo 17.0 |
| No-code setup | No. It is set in view XML and depends on module-specific data |
| Alternatives | subtask_kanban_list, subtasks_one2many, progressbar |
What the sub-task counter does
What this means for your team
Supported options in Odoo 19
| Option | Type | What it does |
|---|---|---|
closed_subtask_count | requested field dependency | The first number in the pair. Requested so it is available whatever the list shows. |
subtask_count | requested field dependency | The second number in the pair, the total. |
the toggle | method called on the record | Opens or closes the nested sub-task list. The state belongs to the list, not the widget. |
The toggle is not the widget's state. Clicking calls a method on the record, so the open or closed state belongs to the list rather than to this component.
Working examples
Four getters and a delegated toggle
Version compatibility
| Version | Status | Notes |
|---|---|---|
| Odoo 20.0 | In development | Not released. Byte-identical to Odoo 19 on the development branch. |
| Odoo 19.0 | Verified | Verified against the shipped source. |
| Odoo 18.0 | Verified | Same counter and toggle. |
| Odoo 17.0 | Verified | Same counter with older component conventions. |
| Odoo 16.0 | Not available | Widget does not exist. |
Upgrade note. Present since Odoo 17. The counter and its toggle behavior have been stable across those versions, so an upgrade needs no attention here.
What is changing in Odoo 20
Common problems and fixes
| Symptom | Cause and fix |
|---|---|
| The counter shows zero over zero | The task has no sub-tasks. Expected. The pair only means something once sub-tasks exist. |
| Clicking does not expand anything | The list does not support the nested display. Use it in the standard task list, which does. |
| The counts look stale | They are stored fields recomputed server side. Reload the list after changing a sub-task's stage. |
| The numbers are missing | The dependencies were not requested, which should not happen. Check no customization replaced the descriptor. |
| Options do nothing | The widget declares none. Nothing to configure; the counts drive it. |
| The widget is missing | The Project module is not installed in that database. Install Project. |
Sub-task counter vs the alternatives
| Widget | Best for | Key difference |
|---|---|---|
subtask_counter | Showing sub-task progress on a task row and expanding it in place | A closed over total pair that doubles as the nested list toggle |
| subtask_kanban_list | Sub-tasks on a kanban card | A list with creation rather than a counter |
| subtasks_one2many | Sub-tasks on the task form | A full relation field rather than a counter |
| progressbar | Progress as a bar | Visual rather than exact counts |
Frequently asked questions
What do the two numbers mean?+
Does clicking it expand the sub-tasks?+
Do I need to add the count columns?+
Does it have options?+
Which versions have it?+
Project structures your team will actually maintain
Sub-tasks, stages and dependencies only help if they match how the work really breaks down. We design and implement Odoo Project around your delivery process, on versions 16 through 19.
Book a free consultation