subtasks_one2many
The sub-tasks list on a project task. Its distinguishing behavior is what it does not pass on: when a sub-task opens, only a filtered set of context keys travels with it.
| Technical name | subtasks_one2many |
|---|---|
| Field types | one2many |
| Views | form, with an embedded list or kanban |
| Module | project, the Project app |
| Used in core | 1 occurrence, the sub-tasks list on the task form in project |
| Versions | Odoo 20.0, Odoo 19.0, Odoo 18.0, Odoo 17.0 |
| No-code setup | No. It is a project-specific list widget |
| Alternatives | one2many, notebook_task_one2many, subtask_kanban_list, subtask_counter |
What the sub-tasks list does
What this means for your team
Supported options in Odoo 19
| Option | Type | What it does |
|---|---|---|
active_test | preserved context key | Kept when a sub-task is opened, so archived visibility matches the parent screen. |
propagate_not_active | preserved context key | Kept alongside it, so the archived-visibility decision carries down another level. |
default_* | preserved context keys | Every key beginning with the default prefix survives the filtering, which is how a sub-task inherits presets such as the project. |
mode | string (field attribute) | Which subviews are available. In kanban mode the widget routes card opening through the form switch. |
The kept keys are a fixed list plus a pattern. Two named flags are preserved, and every key beginning with the default prefix is kept as a group. Everything else in the parent's context is dropped when a sub-task is opened.
Working examples
Which context keys survive
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 widget with differences in the context handling. |
| Odoo 17.0 | Verified | First version. |
| Odoo 16.0 | Not available | Widget does not exist. |
Upgrade note. The widget arrived in Odoo 17 and its usage in views is unchanged. What differs across versions is the detail of the context filtering and the kanban handling, so a customization of either is more likely to need attention than a view.
What is changing in Odoo 20
Common problems and fixes
| Symptom | Cause and fix |
|---|---|
| A sub-task does not inherit the project | The default key is not in the field's context. Add a default context key on the field; those survive the filtering. |
| A context key from the parent screen is ignored | Intended. Only two named flags and the default keys are kept. Pass what you need as a default key, or patch the filtering. |
| Archived sub-tasks do not appear | The archived-visibility flag is not set on the parent screen. Set it there; the widget carries it down. |
| A kanban card opens a dialog | The kanban handling was overridden, or the embedded view is not a kanban. Check the mode attribute and any renderer customization. |
| Options are ignored | The widget declares none and the descriptor forwards the dictionary to the embedded view. Use the list attributes and the field context instead. |
| Missing widget error | The project module is not installed in that database. Install Project, or use a plain child list. |
Sub-tasks list vs the alternatives
| Widget | Best for | Key difference |
|---|---|---|
subtasks_one2many | Sub-task lists where the child shares the parent's model | Filters the parent's context down to defaults plus two archived-visibility flags |
| one2many | Child lists on a different model | Passes the context through unfiltered |
notebook_task_one2many | The same idea in another Project tab | A different renderer, no context filtering |
subtask_kanban_list | Sub-tasks shown inline on a kanban card | A view widget on the card rather than a field on the form |
subtask_counter | Just the completion count | A counter rather than a list |
Frequently asked questions
Why does it filter the context?+
How do I preset a field on new sub-tasks?+
What changes in kanban mode?+
Does it support options?+
Which versions have it?+
Project structures that survive contact with a deadline
Sub-tasks, dependencies and the reporting that rolls them up only help if the hierarchy stays honest. We configure Odoo Project around how your delivery actually works, on versions 16 through 19.
Book a free consultation