Skip to main content
iVentureTeam

section_and_note_one2many

This is the widget behind order and invoice lines, the one that lets a line be a section or a note instead of a product. It reads four settings that appear in no option list.

September 18, 2026Updated September 18, 20264 min read
Technical namesection_and_note_one2many
Field typesone2many
Viewsform
Moduleaccount, present wherever Invoicing or Accounting is installed
Used in core0 explicit uses under this exact name in Odoo 19. The document line editors reach it through view inheritance.
VersionsOdoo 19.0, Odoo 20.0
No-code setupNo. There is no Studio entry, and none of its options are exposed anywhere.
Alternativesone2many, section_and_note_text

What the section_and_note_one2many widget does

Order and invoice lines are not a plain one2many. A line can be a real product line, a section header that groups the lines below it, or a free-text note. This widget is what makes one field render all three.

It spreads the standard x2many descriptor and adds the o_field_one2many class, so everything a normal one2many supports still works. What it adds is the section and note handling, plus four settings that control how much of the line editor a given document shows.

Those four are the interesting part, because Odoo declares none of them.

What this means for your team

This is the widget your finance and sales teams look at more than any other, even if nobody can name it. Sections and notes are what turn a flat list of products into a quote a customer can read.

The practical point for anyone customizing documents: the differences between how a sales order, a purchase order and an invoice present their lines are not separate widgets. They are the same widget with different settings, and those settings are not in Studio. If you want a document type that hides prices or suppresses the composition column, that is a view-level change, and the options exist.

Supported options in Odoo 19

Everything the standard one2many supports, plus four settings this widget reads and Odoo never declares. Three are options; the fourth is an attribute on the field tag rather than an option, which is easy to miss.

OptionTypeWhat it does
hide_pricesboolean<strong>Undocumented.</strong> Suppresses the price columns in the line editor. Read from options in extractProps but absent from supportedOptions.(default: false)
hide_compositionboolean<strong>Undocumented.</strong> Suppresses the composition display on lines. Read from options in extractProps but absent from supportedOptions.(default: false)
subsectionsboolean<strong>Undocumented.</strong> Enables nested subsections beneath a section header. Read from options in extractProps but absent from supportedOptions.(default: false)
aggregated_fieldsattribute, comma-separated field names<strong>Undocumented, and an attribute rather than an option.</strong> Names the columns to aggregate per section. Read from the field tag as attrs.aggregated_fields and split on commas with surrounding spaces tolerated. Placing it inside options does nothing.(default: empty)

None of the four appear in supportedOptions, so Studio will show nothing and no options helper will suggest them. They are read directly in extractProps and are as real as any declared option. Note in particular that aggregated_fields is an attribute, not an option: putting it inside options="{...}" does nothing.

Working examples

Ordinary use on a document's line field:

<field name="invoice_line_ids" widget="section_and_note_one2many"/>

Hiding prices, for a document where the recipient should not see them:

<field name="order_line" widget="section_and_note_one2many"
       options="{'hide_prices': True}"/>

Aggregating columns, which is an attribute and not an option:

<field name="order_line" widget="section_and_note_one2many"
       aggregated_fields="price_subtotal, product_uom_qty"/>

This does nothing, and is the mistake worth avoiding:

<!-- wrong: aggregated_fields is an attribute, not an option -->
<field name="order_line" widget="section_and_note_one2many"
       options="{'aggregated_fields': 'price_subtotal'}"/>

Four settings read from two different places

The whole configuration surface is one function:

extractProps: (staticInfo, dynamicInfo) => {
    return {
        ...x2ManyField.extractProps(staticInfo, dynamicInfo),
        aggregatedFields: staticInfo.attrs.aggregated_fields
            ? staticInfo.attrs.aggregated_fields.split(/\s*,\s*/)
            : [],
        hideComposition: staticInfo.options?.hide_composition ?? false,
        hidePrices: staticInfo.options?.hide_prices ?? false,
        subsections: staticInfo.options?.subsections ?? false,
    };
},

Three come from options, one comes from attrs. That split is the trap. A developer who finds aggregated_fields in the source will reasonably assume it belongs in the options dictionary like its three neighbors, and it will be silently ignored there because the code reads staticInfo.attrs.

The splitting regex is worth noting too: /\s*,\s*/ tolerates spaces around the commas, so "a, b , c" parses correctly. Odoo is being forgiving here, which is unusual enough to rely on.

All four default to a falsy value, so omitting them gives you the full line editor. That means these options only ever subtract: there is nothing here that turns something on that was off.

Version compatibility

VersionStatusNotes
Odoo 19.0VerifiedVerified against the shipped 19.0 source.
Odoo 20.0VerifiedUnchanged, though the related section_and_note_text widget was removed.

Unchanged in Odoo 20, though a closely related widget was removed.

What is changing in Odoo 20

This widget is unchanged. Diffing the registration between the 19.0 and 20.0 branches shows no options added or removed.

Its sibling did not survive. section_and_note_text, the widget that rendered the text of a section or note line, is removed in Odoo 20 after six uses in Odoo 19, and product_label_section_and_note_field went with it. If you inherited or referenced either of those, check them before upgrading; this one carries over untouched.

Common problems and fixes

SymptomCause and fix
aggregated_fields has no effectIt was placed inside options. The source reads it from attrs, not options. Move it onto the field tag as an attribute: aggregated_fields="price_subtotal, quantity".
None of the four settings appear in StudioAll four are undeclared. supportedOptions is empty for this widget. Set them in the view XML. They work despite being undocumented.
A section header behaves like an empty product lineThe plain one2many widget is in use rather than this one. Set widget="section_and_note_one2many" on the line field.
section_and_note_text stopped working after upgrading to Odoo 20That sibling widget was removed in Odoo 20. This one was not. Remove the reference. There is no drop-in replacement; check how Odoo 20 renders the same lines.

Section_and_note_one2many widget vs the alternatives

WidgetBest forKey difference
section_and_note_one2manyOrder and invoice lines with sections and notesFour real settings that appear in no option list, one of them an attribute
one2manyLine fields with no sections or notesRenders a section header as an empty product line
section_and_note_textThe text of a section or note line in Odoo 19Removed in Odoo 20

There is no real alternative for document lines. A plain one2many will render the same records but will treat a section header as a product line with no product, which is exactly the mess this widget exists to prevent. Use the standard one2many only for line fields that genuinely have no sections or notes.

Frequently asked questions

How do I hide prices on Odoo order lines?+
Set options="{'hide_prices': True}" on the line field using widget="section_and_note_one2many". The option is real but undeclared, so it will not appear in Studio or any options helper.
Why does aggregated_fields do nothing in my options?+
Because it is an attribute, not an option. The widget reads staticInfo.attrs.aggregated_fields, so it must sit on the field tag: aggregated_fields="price_subtotal, quantity". Inside options it is ignored.
What options does section_and_note_one2many support?+
It declares none, but reads four: hide_prices, hide_composition and subsections from options, and aggregated_fields from the field's attributes. All four default to off, so they only ever remove parts of the line editor.
Does this widget change in Odoo 20?+
No. The registration is identical on the 20.0 branch. Its sibling section_and_note_text was removed in Odoo 20, so check for that one before upgrading.

Quotes and invoices that do not read the way you sell?

Sections, notes, hidden prices and per-section totals are all view-level settings that Studio will never show you. We shape Odoo's document line editors around how your quotes actually need to look to a customer.

Talk to an Odoo consultant

How this page was produced

Verified by reading addons/account/static/src/components/section_and_note_fields_backend/section_and_note_fields_backend.js on the 19.0 branch of a local clone of the official Odoo repository. The four settings and the attribute-versus-option split are quoted verbatim from extractProps. The registration was diffed against the 20.0 branch, and the removal of section_and_note_text comes from the same diff. Corrections welcome via our contact page.