question_page_one2many
The survey question list looks like an ordinary embedded list until you add a section. question_page_one2many is the widget that makes sections behave, and it saves the whole survey behind your back on every edit.
| Technical name | question_page_one2many |
|---|---|
| Field types | one2many, many2many |
| Views | form, with an embedded list and an optional kanban |
| Module | survey |
| Used in core | 1 occurrence, the Questions tab of the survey form in survey |
| Versions | Odoo 20.0, Odoo 19.0, Odoo 18.0, Odoo 17.0, Odoo 16.0 |
| No-code setup | No. It is a view XML widget and depends on a discriminating boolean field on the child model |
| Alternatives | one2many, many2many, survey_description_page, portal_wizard_user_one2many |
What the question list field does
What this means for your team
Supported options in Odoo 19
| Option | Type | What it does |
|---|---|---|
is_page | field on the child model | Hardcoded discriminator. Rows where it is true render as sections. The name is written literally in the renderer and cannot be changed from XML. |
title | field on the child model | Hardcoded title column. Section rows merge the columns following it, up to the next column the renderer is told to keep. |
default_is_page | context key on the create button | Set on a <create> control's context. When true, and the screen is not small, the new row is added inline; otherwise the row opens in a dialog. |
editable | string (list attribute) | The widget defaults the embedded list to editable at the bottom, unlike a plain one2many which is not editable unless the list says so.(default: bottom) |
mode | string (field attribute) | Which subviews are available. Core uses list,kanban so the questions can also be shown as cards. |
The section behavior is hardcoded, not configured. The renderer uses the field name is_page as its discriminator and title as the title column, both written literally in the source. A model that names those fields differently will render as an ordinary list with no sections at all, and nothing will warn you.
Working examples
Forced parent saves, and why a bad row disappears
Version compatibility
| Version | Status | Notes |
|---|---|---|
| Odoo 20.0 | In development | Not released. Same behavior on the development branch; props and service lookup are modernized. |
| Odoo 19.0 | Verified | Verified against the shipped source. Same behavior as Odoo 18. |
| Odoo 18.0 | Verified | Identical behavior, including the forced parent save and the Validation Error notification. |
| Odoo 17.0 | Verified | This is where the forced parent save, the failed-row cleanup and the custom error handler were introduced. |
| Odoo 16.0 | Partial / changed | Section rendering and the open-record helper only. No forced parent save, no custom error handling, and the component was registered directly rather than as a descriptor. |
Upgrade note. No XML change is needed anywhere between Odoo 16 and Odoo 19, but the behavior is not the same. Odoo 16 has only the renderer swap and the open-record helper; the forced parent save, the row cleanup and the Validation Error notification all arrive in Odoo 17. If a custom module patched this widget on Odoo 16, expect the patch to be built on a much smaller class than the one it will meet on 17 and later.
What is changing in Odoo 20
Common problems and fixes
| Symptom | Cause and fix |
|---|---|
| Sections do not render differently from questions | The child model has no field named is_page, which the renderer uses literally. Add that field name to the child model, or subclass the renderer with your own discriminator. |
| Adding a section opens a dialog instead of editing inline | The create control's context does not set default_is_page, or the screen is treated as small. Add context="{'default_is_page': True}" to that create control. On a phone the dialog is intentional. |
| A new question disappeared after I filled it in | The parent save failed, so the widget removed the row and raised a Validation Error notification. Read the notification, fix the cause on the survey or another question, then add the question again. |
| Clicking a question does nothing | The parent record could not be saved, and the widget refuses to open a dialog in that state. Resolve the pending validation error on the survey form, then reopen the question. |
| The survey saves itself while I am still editing | Intended. Every question create or update triggers a save of the parent record. Build questions with that in mind; there is no option to disable it. |
| Section titles do not span the columns | The column layout does not match what the renderer expects, most often because the title column is not present. Include the title field in the embedded list, and keep the count column the renderer preserves. |
| The pencil icon on section rows is missing | That icon comes from the companion title widget, not from this one. Set widget="survey_description_page" on the title column, as the core view does. |
Question list field vs the alternatives
| Widget | Best for | Key difference |
|---|---|---|
question_page_one2many | One relation that mixes structural section rows with content rows | Section-aware renderer plus a forced save of the parent record on every child edit |
| one2many | An ordinary list of child records | No section rendering and no parent save; rows are committed with the form |
| many2many | Linking existing records rather than owning them | Adds and removes links instead of creating and deleting rows |
| survey_description_page | The title cell inside this list | A cell widget, not a list widget; it renders the open-section button |
| portal_wizard_user_one2many | Wizard lists with slow row buttons | Swaps the controller for click protection rather than the renderer for sections |
Frequently asked questions
Why does the survey save itself when I add a question?+
Why did my new question vanish?+
Why does adding a section edit inline while adding a question opens a dialog?+
Can I use question_page_one2many on my own model?+
What options does it support?+
Building a document your users edit as a list?
Sectioned lists, inline editing and validation that fires at the right moment are the difference between an editor people enjoy and one they route around. We design and build that kind of screen on Odoo 16 through 19, renderer included.
Book a free consultation