Skip to main content
iVentureTeam

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.

Siddharth JambukiyaSiddharth JambukiyaOdoo Techno-Functional Consultant
August 27, 2026Updated August 28, 20264 min read
Technical namesubtasks_one2many
Field typesone2many
Viewsform, with an embedded list or kanban
Moduleproject, the Project app
Used in core1 occurrence, the sub-tasks list on the task form in project
VersionsOdoo 20.0, Odoo 19.0, Odoo 18.0, Odoo 17.0
No-code setupNo. It is a project-specific list widget
Alternativesone2many, notebook_task_one2many, subtask_kanban_list, subtask_counter

What the sub-tasks list does

Sub-tasks are tasks, which makes their list unusual: the child records use the same model as the parent, and the parent's screen is full of context keys meant for it rather than for them. Passed through unfiltered, that context can preset fields on a sub-task in ways nobody intended.

This widget is the sub-tasks list, and its characteristic behavior is that filtering. When a sub-task is opened, it builds a reduced context from the parent's: the flags that control whether archived records are visible and how that propagates, plus every default value key, and nothing else.

It also adapts to the kanban view. When the sub-tasks are shown as cards, opening one is routed through the switch to the form rather than the default record opening, so a card behaves like a link to the task.

What this means for your team

Sub-task hygiene is where project structures either stay useful or collapse into a flat list. The context filtering matters because a sub-task that silently inherits a filter or a default from wherever the parent was opened is a sub-task nobody trusts.

The general point applies to any nested relation on the same model. Whenever a child list shares the parent's model, decide explicitly what context should travel; the default of passing everything is almost never what you mean.

Supported options in Odoo 19

The widget declares no supported options, and neither does the x2many descriptor it spreads. The context keys it preserves are listed below, since those are what actually reach a sub-task. Read from subtask_one2many_field.js, Odoo 19.0.

OptionTypeWhat it does
active_testpreserved context keyKept when a sub-task is opened, so archived visibility matches the parent screen.
propagate_not_activepreserved context keyKept alongside it, so the archived-visibility decision carries down another level.
default_*preserved context keysEvery key beginning with the default prefix survives the filtering, which is how a sub-task inherits presets such as the project.
modestring (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

The core usage, trimmed

<field name="child_ids" widget="subtasks_one2many"
       mode="list,kanban">
  <list editable="bottom"> ... </list>
</field>

Both view modes are supported, and the kanban mode changes how a card opens.

Presetting a sub-task

<field name="child_ids" widget="subtasks_one2many"
       context="{'default_project_id': project_id}"/>

Default keys survive the filtering, which is how a sub-task inherits the project.

What does not travel

# dropped when a sub-task opens
search_default_*, group_by, form_view_ref, ...

Only the two named flags and the default keys are kept.

Which context keys survive

The context filtering is a single method. It collects every key from the field's context that begins with the default prefix, then picks from the context exactly those keys plus two named flags: the one controlling whether archived records are included, and the one controlling whether that setting propagates.

Both of those matter for sub-tasks specifically. A parent task viewed with archived records visible should open its sub-tasks the same way, and the propagate flag is what carries that decision down another level.

The kanban adjustment is smaller but visible. When the embedded view is a kanban, the renderer's open handler is replaced with the widget's own switch to the form view, so clicking a card navigates rather than opening a dialog. In list mode the standard behavior applies.

Everything else, including the sub-task list's own rendering, belongs to the renderer this widget substitutes rather than to the widget itself, which is why the file is short.

Version compatibility

VersionStatusNotes
Odoo 20.0In developmentNot released. Byte-identical to Odoo 19 on the development branch.
Odoo 19.0VerifiedVerified against the shipped source.
Odoo 18.0VerifiedSame widget with differences in the context handling.
Odoo 17.0VerifiedFirst version.
Odoo 16.0Not availableWidget 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

Odoo 20 is expected at Odoo Experience in Brussels, 24 to 26 September 2026. The development branch is unstable and this may still change; we re-verify this page after the release.

Byte-identical. The file on the development branch matches Odoo 19 exactly, including the filtered context and the kanban open handling.

Common problems and fixes

SymptomCause and fix
A sub-task does not inherit the projectThe 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 ignoredIntended. 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 appearThe archived-visibility flag is not set on the parent screen. Set it there; the widget carries it down.
A kanban card opens a dialogThe kanban handling was overridden, or the embedded view is not a kanban. Check the mode attribute and any renderer customization.
Options are ignoredThe widget declares none and the descriptor forwards the dictionary to the embedded view. Use the list attributes and the field context instead.
Missing widget errorThe project module is not installed in that database. Install Project, or use a plain child list.

Sub-tasks list vs the alternatives

WidgetBest forKey difference
subtasks_one2manySub-task lists where the child shares the parent's modelFilters the parent's context down to defaults plus two archived-visibility flags
one2manyChild lists on a different modelPasses the context through unfiltered
notebook_task_one2manyThe same idea in another Project tabA different renderer, no context filtering
subtask_kanban_listSub-tasks shown inline on a kanban cardA view widget on the card rather than a field on the form
subtask_counterJust the completion countA counter rather than a list

A plain child list is right wherever the child model differs from the parent's, because the context confusion this widget guards against does not arise. Within Project, the notebook variant is the same idea for a different tab, and the kanban list widget shows sub-tasks inline on a card rather than on the form.

Frequently asked questions

Why does it filter the context?+
Because sub-tasks use the same model as their parent, so the parent screen's context could preset fields on a sub-task unintentionally. The widget keeps only default keys and two archived-visibility flags.
How do I preset a field on new sub-tasks?+
With a default key in the field's context. Those survive the filtering by design, which is how a sub-task inherits its project.
What changes in kanban mode?+
Opening a card is routed through the switch to the form view rather than the default record opening, so a card behaves like a link to the task.
Does it support options?+
None of its own. Like every x2many widget it forwards the options dictionary to the embedded view as CRUD settings.
Which versions have it?+
Odoo 17 onwards, and it is byte-identical on the Odoo 20 development branch.

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

How this page was produced

The context filtering, the two preserved flags, the default key pattern and the kanban open handling were read from subtask_one2many_field.js on the Odoo 19.0 branch, with the usage taken from the project task form. Version coverage comes from comparing the file across the 17.0 and 18.0 branches and a byte comparison against the public development branch. Spotted an error? Tell us and we will correct the page.