many2one
The autocomplete dropdown on Customer, Product and every other record link in Odoo is the many2one widget. It is the default for its field type, which is why you rarely type its name, and why its options are worth knowing by heart.
| Studio name | Many2One |
|---|---|
| Technical name | many2one |
| Field types | many2one |
| Views | form, list, kanban |
| Module | web, present in every Odoo database |
| Used in core | 6 explicit occurrences across 5 modules, including sale_expense, stock, purchase, event, point_of_sale; applied implicitly to every many2one field in every view |
| Versions | Odoo 20.0, Odoo 19.0, Odoo 18.0, Odoo 17.0, Odoo 16.0 |
| No-code setup | Yes: it is the default widget for Many2One fields in Studio |
| Alternatives | many2one_avatar, radio, selection |
What the Many2one field does
What this means for your team
Setting it up in Odoo Studio (no code)
What Studio cannot do here
Supported options in Odoo 19
| Option | Type | What it does |
|---|---|---|
no_open | boolean | Removes the internal link that opens the selected record, so the value is select-only. Studio exposes this as Disable opening. |
no_create | boolean | Removes every create path from the dropdown: both quick create and the Create and edit popup. Overrides the two finer options below. Studio exposes this as Disable creation. |
no_quick_create | boolean | Removes only the inline Create "..." entry that creates a record from the typed text. The Create and edit popup form remains available. |
no_create_edit | boolean | Removes only the Create and edit popup form. One-click quick create from the typed text remains available. |
search_threshold | number | Minimum number of typed characters before the autocomplete queries the server. Unset, the search fires on focus, before any typing. Studio exposes this as Typeahead search.(since Odoo 19.0) |
placeholder_field | field name (char) | A char field on the current record whose value becomes the input's placeholder text, making the hint dynamic per record.(since Odoo 19.0) |
can_scan_barcode | boolean (undocumented) | Read only in extractProps, declared nowhere. On mobile devices with a supported camera it adds a barcode scan button; a scan that matches exactly one record selects it directly. |
create_name_field | field name (undocumented) | Read only in extractProps, declared nowhere. Tells quick create which field on the target model receives the typed text, for models whose display field is not called name.(default: name) |
The create options stack, they do not compete. no_create wins over everything and kills both create paths. With create allowed, no_quick_create removes only the inline Create "..." entry and no_create_edit removes only the Create and edit... popup. Separately, the can_create and can_write attributes (Python expressions on the field element) gate the same behavior from the access-rights side; no_create and a false can_create produce the same end state.
Working examples
Inside the Odoo 19 rewrite
Version compatibility
| Version | Status | Notes |
|---|---|---|
| Odoo 20.0 | In development | Not released. Options unchanged on the development branch; internal props-schema rework. See below. |
| Odoo 19.0 | Verified | Verified against the shipped source. Adds search_threshold and placeholder_field; drops the list./kanban. aliases. |
| Odoo 18.0 | Partial / changed | Four no_* options only; no search_threshold or placeholder_field. Also registered as list.many2one and kanban.many2one. |
| Odoo 17.0 | Partial / changed | Same four no_* options as 18.0, verified in the 17.0 source. |
| Odoo 16.0 | Partial / changed | Present with the core no_* option set; predates the Odoo 19 component refactor. |
Upgrade note. Odoo 18 and earlier registered list.many2one and kanban.many2one as duplicate entries, with a source comment saying they exist "to prevent the fallback on legacy widgets". Odoo 19 removed both aliases along with the legacy machinery. XML is unaffected, but JavaScript that patched those registry entries or imported Many2OneField internals needs review: the interactive logic now lives in the Many2One component, not the field wrapper.
What is changing in Odoo 20
Common problems and fixes
| Symptom | Cause and fix |
|---|---|
| Users keep creating duplicate records from the dropdown | Quick create accepts any typed text with one click, bypassing your form's required fields. Set options="{'no_quick_create': True}" to force creation through the popup form, or no_create to block creation entirely. |
| The dropdown search feels slow on a big model | By default the search fires on focus, before the user types anything. Set options="{'search_threshold': 2}" (Odoo 19+) so the query waits for typed characters. |
| Quick create fails with a required-field error | The target model has required fields beyond its name, so name_create cannot save it at save time. Use no_quick_create so users go through Create and edit, where all required fields can be filled. |
| The value shows as "Unnamed" | The linked record has no display_name; the widget substitutes the Unnamed label itself. Fix the target record's name field, or check _compute_display_name on the target model. |
| The record link is missing | no_open is set on the field, or the record is not saved yet and the input is in its floating state. Remove no_open from the options if users should navigate to the record. |
| A JavaScript patch broke after upgrading to Odoo 19 | The widget was rebuilt around the Many2One component; list.many2one and kanban.many2one registry aliases were removed. Re-target the patch at the Many2One component or computeM2OProps, and drop references to the removed aliases. |
Many2one field vs the alternatives
| Widget | Best for | Key difference |
|---|---|---|
many2one | Any single-record link where users search by name | The default: autocomplete plus create and open controls, all governed by options |
| many2one_avatar | Links to people, users or employees | Same behavior plus the record's avatar image next to the name |
| radio | Small, stable sets of records (under a dozen) | Shows every option at once as radio buttons; no search, no create |
| selection | Read-mostly picks from a short list | Renders the many2one as a plain dropdown with one cached search, capped at 100 records |
Frequently asked questions
How do I disable record creation in an Odoo many2one field?+
Why don't I see widget="many2one" in Odoo's own views?+
How do I limit which records can be selected?+
What does search_threshold do?+
Does quick create save the record immediately?+
Can users scan a barcode to fill a many2one?+
Duplicate customers and messy master data?
Nine times out of ten the fix starts with how your many2one fields are configured: who may create records, from where, and behind which required fields. We audit and tighten relational fields across your Odoo views, from quick wins like no_quick_create to full deduplication runs.
Clean up our record links