Skip to main content
iVentureTeam

field_selector

The field selector puts Odoo's field-path picker on a char field: users browse a model's fields, drill through relations like partner_id.country_id.code, and the dotted path is what gets stored.

Siddharth JambukiyaSiddharth JambukiyaOdoo Techno-Functional Consultant
August 16, 2026Updated August 16, 20265 min read
Odoo 19 automation rule form with the field selector popover open, listing Account Currency, Account Name and Account Status with chevrons for drilling into many2one and one2many relations.
Technical namefield_selector
Field typeschar
Viewsform
Moduleweb, present in every Odoo database
Used in core9 occurrences across 2 modules, including marketing_card, mail
VersionsOdoo 20.0, Odoo 19.0
No-code setupNo. The widget targets configuration models, which are developer or admin territory.
Alternativesdomain, properties, selection, CopyClipboardChar

What the field selector does

Configuration records frequently need to point at "some field of some model": the field a marketing card pulls its headline from, the field an automation writes, the attribute a report groups by. Storing that as free text invites typos; storing it as a relation to ir.model.fields is heavy and cannot express paths. The field_selector widget solves it with a char field wearing Odoo's ModelFieldSelector popover: the user browses actual field names with their labels and types, drills through relations with chevrons, and the widget stores the resulting dotted path as text.

Because the value is just a string like partner_id.country_id.code, it slots directly into everything Odoo evaluates paths with: mapped reads, domain construction, QWeb expressions. The picker guarantees the path was valid against the model at selection time.

What this means for your team

This widget is a builder of no-code building blocks. Marketing cards let a marketer choose which field of the campaign's model appears on the shared image; automation-adjacent tooling lets an admin pick the field to watch or write. In each case the alternative was a text box and a support ticket when the path had a typo in it. If you are building configurable features for non-technical admins, template engines, export mappers, integration field maps, this is the input control that keeps your support queue short.

A worked example from our own practice: a client's custom document generator needed "which field holds the signatory's email" per document type. Swapping a char input for field_selector with only_searchable off and relations on eliminated an entire class of misconfigured templates, because invalid paths simply cannot be picked.

Supported options in Odoo 19

Verified against field_selector_field.js in the Odoo 19.0 web module. Three options are declared; a fourth, allow_properties, is read in extractProps without being declared anywhere, and the model option behaves differently from what its name suggests.

OptionTypeWhat it does
follow_relationsbooleanWhether the picker offers chevrons to drill into many2one, one2many and many2many fields, producing dotted paths. Disable to restrict selection to direct fields of the model.(default: true)(since Odoo 19.0)
modelfield nameName of a field on the current record that holds the target model's technical name. Falls back to the current model when the lookup fails, including when a literal model name was passed by mistake.(since Odoo 19.0)
only_searchablestringParsed as a boolean expression; when truthy, only searchable fields are offered. Removed on the development branch.(since Odoo 19.0)
allow_propertiesbooleanUndeclared option read only in extractProps: controls whether property fields appear in the tree. The properties separator itself is always hidden.(default: true)(since Odoo 19.0)

model wants a field name. The component resolves it as record.data[model], falling back to the current record's model when that lookup returns nothing. Passing a literal model name therefore does not error, it just quietly shows the wrong field tree. Put the target model in a char field (as mail.template style models do) and point model at that field.

Working examples

Pick a field of the current model

<field name="field_path" widget="field_selector"/>

Pick a field of a model chosen elsewhere on the form

<field name="model_name" invisible="1"/>
<field name="field_path"
       widget="field_selector"
       options="{'model': 'model_name'}"/>

This is the marketing_card pattern: model_name holds something like res.partner, and the picker browses that model. The referenced field must be loaded in the view, hence the invisible line.

Searchable fields only, no relation drilling

<field name="group_by_field"
       widget="field_selector"
       options="{'only_searchable': 'true', 'follow_relations': false}"/>

Right for paths that end up in domains or group-by clauses, where non-stored, non-searchable fields would fail at runtime.

Required, debug and the properties filter

Details from the source worth knowing before building on it.

The required flag reaches the popover. The component passes allowEmpty: !required, so a required field-selector refuses to store an empty path while an optional one offers a clear action. Debug mode also flows through: with developer mode on, the popover shows technical names and types it otherwise hides.

Properties are filtered twice. The component's filter hides the properties separator always, and hides property fields themselves unless allow_properties is truthy, which it is by default. Set it false when the stored path feeds machinery that cannot evaluate property paths.

Readonly renders the raw path. In readonly state the widget formats the char value as plain text, dotted path and all. If you want a human label shown to viewers, pair it with a computed description field; the widget does not resolve the path to labels outside the picker.

Version compatibility

VersionStatusNotes
Odoo 20.0In developmentNot released. only_searchable is removed and the model option gains a literal fallback on the development branch. Details below.
Odoo 19.0VerifiedFirst release of the field widget. Verified against the shipped source.
Odoo 18.0Not availableThe generic field widget does not exist; only internal selector components do.
Odoo 17.0Not availableNot available.
Odoo 16.0Not availableNot available.

Upgrade note. The widget does not exist as a field widget before 19: Odoo 18 has the ModelFieldSelector component and a separate dynamic_model_field_selector_char widget wired into specific flows, but not this general-purpose registration. Views written for 19 do not backport.

What is changing in Odoo 20

Odoo 20 is expected at Odoo Experience in Brussels, 24 to 26 September 2026. These notes are read from the public development branch, which can change until feature freeze, and this page is re-verified after release.

Two option-level changes are visible. only_searchable is removed: the declared option and its filter logic are gone, so paths are no longer restrictable to searchable fields from the view. model becomes dual-natured: the master code resolves record.data[model] first and falls back to the option's literal value, so passing a real model name like res.partner will finally work, fixing the 19 quirk described above. Internally the prop is renamed from followRelations to followRelation, which only matters to JavaScript patches.

Common problems and fixes

SymptomCause and fix
The picker shows fields of the wrong modelThe model option was given a literal model name, which the 19 component treats as a field lookup that fails and falls back to the current model. Store the target model in a field on the record and pass that field's name to the model option.
The picker is empty or missing expected fieldsonly_searchable is filtering to searchable fields, or the referenced model field is not loaded in the view. Drop only_searchable, and include the model-holding field in the view, invisible if need be.
Users can build absurdly deep pathsfollow_relations defaults to true with no depth limit. Set follow_relations: false, or validate path depth server side on save.
Property fields show up where they cannot be evaluatedallow_properties defaults to true. Set options="{'allow_properties': false}" on the field.
Readonly users see a cryptic dotted pathThe widget renders the raw stored value outside edit mode. Add a computed char that resolves the path to human labels for display.

Field selector vs the alternatives

WidgetBest forKey difference
field_selectorConfiguration records that must reference a field, or a path of fields, on some modelStores a validated dotted path in a plain char field
domainStoring a whole filter expression rather than one pathFull domain editor with record counting
propertiesLetting users define new fields instead of referencing existing onesCreates fields at runtime; this widget only points at them
selectionA fixed, developer-curated list of choicesStatic options, no model introspection
CopyClipboardCharChar values users copy rather than buildDisplay convenience, no picker

Choose by what the stored value must be: a field path as text is this widget, a filter expression is the domain widget, and user-defined fields themselves are the properties system.

Frequently asked questions

What does the field_selector widget do in Odoo?+
It renders a char field as Odoo's field-path picker: users browse the fields of a model, optionally drill through relations, and the chosen dotted path such as partner_id.email is stored as the field's text value.
How do I make the picker browse a different model?+
Pass options="{'model': 'some_field'}" where some_field is a field on the current record containing the model's technical name, and make sure that field is loaded in the view. In Odoo 19 a literal model name does not work; the development branch adds that fallback for Odoo 20.
Can I stop users from drilling into relations?+
Yes: options="{'follow_relations': false}" restricts the picker to direct fields of the model, so stored values are single field names rather than dotted paths.
Is field_selector available in Odoo 18?+
No. The underlying ModelFieldSelector component exists there, but the generic field widget registration is new in Odoo 19. Backported views fall back to a plain char input.
What changes for field_selector in Odoo 20?+
On the development branch, only_searchable is removed entirely, and the model option finally accepts a literal model name as fallback after the field lookup. Both are unreleased observations until the September 2026 launch, and we re-verify after it ships.

Building admin-configurable features?

Field mappers, export templates, integration configs your admins maintain themselves: the difference between a tool and a ticket generator is controls like this one. We design and build no-code configuration surfaces inside Odoo that non-developers can safely own.

Build your configurable module

How this page was produced

This page was verified by reading field_selector_field.js on the Odoo 19.0 branch, confirming the widget's absence from 18.0, and diffing against the development branch, which removes only_searchable and reworks the model option. The undeclared allow_properties option and the model-as-field-name resolution come from extractProps and the component getters respectively. Corrections are welcome via our contact page.