Skip to main content
iVentureTeam

section_one2many

Working schedules in Odoo show Morning and Afternoon as bold rows spanning the whole table. That layout is section_one2many, a resource module one2many whose section rows are ordinary records with display_type = 'line_section' and a hardcoded title field.

Siddharth JambukiyaSiddharth JambukiyaOdoo Techno-Functional Consultant
August 20, 2026Updated August 20, 20265 min read
Technical namesection_one2many
Field typesone2many
Viewsform (embedded list)
Moduleresource
Used in core4 occurrences across 2 modules: resource (working schedule attendance lists), point_of_sale
VersionsOdoo 19.0, Odoo 18.0, Odoo 17.0, Odoo 16.0
No-code setupNo. Studio has no entry for it; apply widget="section_one2many" in XML and prepare the model fields.
Alternativesone2many, product_label_section_and_note_field, section_and_note_text

What the Section one2many widget does

section_one2many extends the standard embedded one2many table with exactly one swap: the list renderer becomes SectionListRenderer, a subclass that promotes certain rows to section headers. It also forces two defaults, inline editing at the bottom (editable: "bottom") and the o_field_one2many CSS class.

The renderer's contract, read from section_list_renderer.js, is precise. A row is a section when record.data.display_type === "line_section". Section rows get bold styling and an o_is_line_section class, drop every column except drag handles, and stretch one cell across the remaining width. That cell shows the field named title, a name hardcoded in the renderer.

The result is the working schedule editor every Odoo user has seen: Morning and Afternoon captions separating attendance lines, all stored in the same one2many.

What this means for your team

Long line lists without visual structure are where configuration errors live. Working schedules are the canonical case: two weeks of attendance lines are unreadable until Morning, Afternoon and week captions split them. Sections give operational lists document like readability without leaving the record.

The pattern is reusable on custom models, order checklists, inspection protocols, onboarding step lists, provided you mirror the model contract: a display_type selection containing line_section and a char field named exactly title. It is a cheaper structure than splitting data into separate tabs or child models.

Supported options in Odoo 19

The widget declares no options of its own. Because it spreads the base x2ManyField descriptor, the one2many crud options (create, delete, link, unlink, write, boolean or domain) pass through unchanged; see the one2many page for their full semantics. The real configuration surface is the model contract listed below as pseudo options.

OptionTypeWhat it does
display_type (model contract)selection field on the line modelNot an option but a requirement: the renderer promotes a row to a section header exactly when this field equals line_section. The field name and value are hardcoded in SectionListRenderer.
title (model contract)char field on the line modelThe caption shown in the section row. The renderer looks up the column bound to a field literally named title; a caption stored in name or any other field renders an empty section.
create / delete / link / unlink / writeboolean or domainInherited unchanged from the base one2many descriptor, including domain evaluation against the parent record. See the one2many page for full semantics.(default: true)

The renderer's two anchors are hardcoded: display_type with the value line_section, and the caption field title. Models that name their caption field name (like account's section and note lines) render empty section rows with this widget; that is the number one integration surprise.

Working examples

The working schedule usage from resource_calendar_views.xml:

<field name="attendance_ids" widget="section_one2many"/>

The two week schedule variant seeds each tab with a default via context:

<field name="attendance_ids_1st_week" widget="section_one2many"
       context="{'default_week_type': '0'}"/>

A custom model needs the contract fields before the widget does anything special:

display_type = fields.Selection([('line_section', 'Section')])
title = fields.Char()

Inside SectionListRenderer: colspans, defaults and section creation

Reading section_list_renderer.js answers the questions the working schedule form raises:

Why do section rows survive column changes? getSectionColumns rebuilds the row from scratch: it keeps only columns whose widget is handle, then appends the title column with a computed colspan covering everything else (plus one when the delete trash can is active). Add or remove columns from the embedded list and sections adapt automatically.

Why is the list editable without saying so? The widget's defaultProps set editable: "bottom", so new lines append inline even when the subview arch omits the editable attribute. An explicit arch value still wins.

How do sections get created? The widget adds no special Add a section control. Odoo's schedule views handle it with context defaults and server side logic; a bare custom view creates sections by adding a line with display_type set to line_section, typically via a context default on a dedicated button.

How does it differ from account's section lists? The account module ships its own section renderers (see product_label_section_and_note_field) keyed on the name field and supporting notes; this resource variant is leaner, sections only, caption field title.

Version compatibility

VersionStatusNotes
Odoo 20.0In developmentNot released. The widget and its renderer are deleted in the development branch; see below.
Odoo 19.0VerifiedVerified against the shipped source and tested on a clean database.
Odoo 18.0VerifiedFunctionally identical; class syntax modernized only.
Odoo 17.0VerifiedSame widget and renderer contract.
Odoo 16.0VerifiedPresent with identical behavior in older class syntax; survey shipped a separate legacy variant.

16 through 19 are drop in compatible; the file only gained syntax modernization. Plan the Odoo 20 migration early because the widget disappears entirely there.

What is changing in Odoo 20

Odoo 20 is expected at Odoo Experience in Brussels, 24 to 26 September 2026. The changes below are read from the public development branch and are not final until release.

The widget is deleted on master. Both section_one2many_field.js and its SectionListRenderer are gone from the resource module, and resource_calendar_views.xml no longer references the widget. The schedule editing views move to a new set of calendar oriented components (resource_calendar_attendance_calendar_one2many and related files). Custom views using widget="section_one2many" will fall back to a plain one2many after upgrading, losing their section rows silently, so this belongs on every 20 migration checklist.

We will re verify this page against the released branch after the launch.

Common problems and fixes

SymptomCause and fix
Section rows appear but their captions are emptyThe renderer reads a field literally named title; your model stores the caption elsewhere (often name). Add a title char field to the line model or rename, and include it as a column in the embedded list.
No rows ever render as sectionsThe line model lacks a display_type selection or no row carries the value line_section. Add the display_type selection with a line_section entry and create section rows with that value.
After an Odoo 20 upgrade the sections disappearedThe widget is removed on the development branch; unknown widget names fall back to the plain one2many. Rebuild the view on the new resource calendar components or ship a custom renderer during migration.
New lines open a dialog instead of editing inlineThe embedded list arch explicitly disables editing, which overrides the widget's editable bottom default. Remove the conflicting editable attribute from the subview arch.

Section one2many widget vs the alternatives

WidgetBest forKey difference
section_one2manyOne2many line lists that need bold section captions, like working schedulesSection rows keyed on display_type line_section with a hardcoded title caption field
one2manyPlain child record tables without sectionsSame base component without the section renderer
product_label_section_and_note_fieldOrder line sections and notes in accounting and salesAccount module family keyed on the name field, supports note rows too
section_and_note_textThe text cells inside account section listsA text widget for individual cells, not the list container

Choose by caption field and feature set: title based sections here, name based sections plus notes in the account widgets, or no sections at all with the plain one2many.

Frequently asked questions

What is the section_one2many widget in Odoo?+
A resource module one2many whose list renderer turns rows with display_type = 'line_section' into bold full width section headers, used most visibly on working schedule attendance lines.
How do I add sections to my own one2many list?+
Give the line model a display_type selection containing line_section and a char field named exactly title, then set widget="section_one2many" on the field (the resource module must be installed). Rows carrying the section value render as captions.
Why does my section caption not show while account order lines work fine?+
Account's section widgets read the name field; this one hardcodes title. The two families share the display_type idea but not the caption field.
Can I control who may add or remove lines?+
Yes, with the inherited one2many crud options: options="{'create': ..., 'delete': ..., 'write': ...}", each accepting a boolean or a domain evaluated against the parent record.
Is section_one2many still there in Odoo 20?+
In the current development branch it is deleted along with its renderer, and Odoo's schedule views move to new calendar components. Until the September 2026 release this can still change, but plan migrations assuming it is gone.

Keep your structured line lists alive through Odoo 20

This widget vanishes in the next Odoo version, and views that use it will silently flatten. We migrate section based lists, working schedules and custom renderers across Odoo upgrades without losing a single caption.

Plan my Odoo 20 migration

How this page was produced

This page was verified by reading the Odoo 19.0 resource module source, section_one2many_field.js and section_list_renderer.js, including the hardcoded display type and title field, then checking the 16.0 through 18.0 branches for changes and the public development branch for the deletion. Behavior was confirmed on a clean Odoo 19 database using the standard working schedule form. Corrections are welcome via our contact page.