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.
| Technical name | section_one2many |
|---|---|
| Field types | one2many |
| Views | form (embedded list) |
| Module | resource |
| Used in core | 4 occurrences across 2 modules: resource (working schedule attendance lists), point_of_sale |
| Versions | Odoo 19.0, Odoo 18.0, Odoo 17.0, Odoo 16.0 |
| No-code setup | No. Studio has no entry for it; apply widget="section_one2many" in XML and prepare the model fields. |
| Alternatives | one2many, product_label_section_and_note_field, section_and_note_text |
What the Section one2many widget does
What this means for your team
Supported options in Odoo 19
| Option | Type | What it does |
|---|---|---|
display_type (model contract) | selection field on the line model | Not 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 model | The 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 / write | boolean or domain | Inherited 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
Inside SectionListRenderer: colspans, defaults and section creation
Version compatibility
| Version | Status | Notes |
|---|---|---|
| Odoo 20.0 | In development | Not released. The widget and its renderer are deleted in the development branch; see below. |
| Odoo 19.0 | Verified | Verified against the shipped source and tested on a clean database. |
| Odoo 18.0 | Verified | Functionally identical; class syntax modernized only. |
| Odoo 17.0 | Verified | Same widget and renderer contract. |
| Odoo 16.0 | Verified | Present 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
Common problems and fixes
| Symptom | Cause and fix |
|---|---|
| Section rows appear but their captions are empty | The 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 sections | The 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 disappeared | The 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 inline | The 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
| Widget | Best for | Key difference |
|---|---|---|
section_one2many | One2many line lists that need bold section captions, like working schedules | Section rows keyed on display_type line_section with a hardcoded title caption field |
| one2many | Plain child record tables without sections | Same base component without the section renderer |
product_label_section_and_note_field | Order line sections and notes in accounting and sales | Account module family keyed on the name field, supports note rows too |
| section_and_note_text | The text cells inside account section lists | A text widget for individual cells, not the list container |
Frequently asked questions
What is the section_one2many widget in Odoo?+
How do I add sections to my own one2many list?+
Why does my section caption not show while account order lines work fine?+
Can I control who may add or remove lines?+
Is section_one2many still there in Odoo 20?+
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