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.
| Technical name | field_selector |
|---|---|
| Field types | char |
| Views | form |
| Module | web, present in every Odoo database |
| Used in core | 9 occurrences across 2 modules, including marketing_card, mail |
| Versions | Odoo 20.0, Odoo 19.0 |
| No-code setup | No. The widget targets configuration models, which are developer or admin territory. |
| Alternatives | domain, properties, selection, CopyClipboardChar |
What the field selector does
What this means for your team
Supported options in Odoo 19
| Option | Type | What it does |
|---|---|---|
follow_relations | boolean | Whether 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) |
model | field name | Name 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_searchable | string | Parsed as a boolean expression; when truthy, only searchable fields are offered. Removed on the development branch.(since Odoo 19.0) |
allow_properties | boolean | Undeclared 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
Required, debug and the properties filter
Version compatibility
| Version | Status | Notes |
|---|---|---|
| Odoo 20.0 | In development | Not released. only_searchable is removed and the model option gains a literal fallback on the development branch. Details below. |
| Odoo 19.0 | Verified | First release of the field widget. Verified against the shipped source. |
| Odoo 18.0 | Not available | The generic field widget does not exist; only internal selector components do. |
| Odoo 17.0 | Not available | Not available. |
| Odoo 16.0 | Not available | Not 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
Common problems and fixes
| Symptom | Cause and fix |
|---|---|
| The picker shows fields of the wrong model | The 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 fields | only_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 paths | follow_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 evaluated | allow_properties defaults to true. Set options="{'allow_properties': false}" on the field. |
| Readonly users see a cryptic dotted path | The 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
| Widget | Best for | Key difference |
|---|---|---|
field_selector | Configuration records that must reference a field, or a path of fields, on some model | Stores a validated dotted path in a plain char field |
| domain | Storing a whole filter expression rather than one path | Full domain editor with record counting |
| properties | Letting users define new fields instead of referencing existing ones | Creates fields at runtime; this widget only points at them |
| selection | A fixed, developer-curated list of choices | Static options, no model introspection |
| CopyClipboardChar | Char values users copy rather than build | Display convenience, no picker |
Frequently asked questions
What does the field_selector widget do in Odoo?+
How do I make the picker browse a different model?+
Can I stop users from drilling into relations?+
Is field_selector available in Odoo 18?+
What changes for field_selector in Odoo 20?+
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