Skip to main content
iVentureTeam

property_selection

New in Odoo 20. It lets a char field pick from the choices of a properties definition living on another record, and it is written with an OWL 3 API that appears nowhere else in Odoo's web module.

September 18, 2026Updated September 18, 20265 min read
Technical nameproperty_selection
Field typeschar
Viewsform
Moduleweb, present in every Odoo 20 database
Used in core1 use across Odoo 20 Community and Enterprise views, excluding tests. Does not exist in Odoo 19.
VersionsOdoo 20.0
No-code setupNo. All three options are required and none are exposed in Studio.
Alternativesselection, property_tags, properties, badges_selection

What the property_selection widget does

Odoo properties let a user define their own fields on a parent record, and a property of type selection carries its own list of values. Those values live in the parent's property definition, not on the record you are editing.

This widget bridges that gap. Point it at a char field, tell it which model, which properties field and which property, and it loads that property's selection values and offers them as choices.

Resolution happens through the field service:

async loadFieldInfos() {
    const propertiesDef = await this.fieldService.loadPropertyDefinitions(
        this.propertyModelName(),
        this.propertyFieldName()
    );
    const propertyDef = propertiesDef[this.propertyName()];
    return propertyDef?.selection ?? []
}

Note the optional chaining and the fallback. A property that cannot be found produces an empty list rather than an error, which is forgiving at runtime and unhelpful when you are debugging a blank field.

What this means for your team

This is a niche widget with a specific job: letting one record choose from a vocabulary that a user defined somewhere else, without a developer creating a selection field for it.

The value is that the vocabulary stays under the user's control. The cost is the usual properties cost: the value is stored as text against a definition elsewhere, so reporting across records is awkward compared with a real selection or a related model.

Before reaching for it, it is worth asking whether the vocabulary is stable enough to deserve a real field. If the same list keeps being defined by hand, it has earned one.

Supported options in Odoo 20

Three options, all declared, and all three are required in practice even though nothing in the option list says so.

OptionTypeWhat it does
property_model_namestring<strong>Required.</strong> Technical name of the model carrying the properties definition, for example project.project. Its prop is declared as a bare String, so omitting it fails prop validation.(since Odoo 20.0)
property_field_namestring<strong>Required.</strong> Name of the properties definition field on that model, for example task_properties_definition.(since Odoo 20.0)
property_namestring<strong>Required.</strong> Key of the individual property inside that definition whose selection values should be offered. A key that does not exist yields an empty list rather than an error.(since Odoo 20.0)

The component declares its props as bare String with no optional marker:

props = props({
    ...standardFieldProps,
    propertyName: String,
    propertyFieldName: String,
    propertyModelName: String,
});

So omitting any one of them fails prop validation rather than degrading to a sensible default. All three must be present for the field to render at all.

Working examples

All three options are mandatory:

<field name="chosen_value" widget="property_selection"
       options="{'property_model_name': 'project.project',
                 'property_field_name': 'task_properties_definition',
                 'property_name': 'my_property_key'}"/>

This fails prop validation rather than rendering an empty selection:

<!-- property_name is missing: the props declaration requires it -->
<field name="chosen_value" widget="property_selection"
       options="{'property_model_name': 'project.project',
                 'property_field_name': 'task_properties_definition'}"/>

The only file in Odoo 20's web module written this way

Odoo 20 moves the web client to OWL 3, and the migration is close to total. We counted the files under addons/web/static/src/ on the 20.0 branch: 268 use useProps(), and only 3 still use the OWL 2 style static props.

This file uses neither. It imports a different API:

import { Component, props, asyncComputed, computed } from "@odoo/owl";

and uses it throughout:

selectedValue = computed(() => this.props.record.data[this.props.name]);
propertyName = computed(() => this.props.record.data[this.props.propertyName])
selectionItems = asyncComputed(() => this.loadFieldInfos(), { initial: [] })

We searched the whole web module for files importing a bare props from @odoo/owl. There is exactly one, and this is it.

Two things follow, and both matter if you are writing widgets for Odoo 20.

First, do not take this file as the pattern to copy. It is an outlier against 268 files, so whatever the reason for it, the convention the rest of core follows is useProps() with the t type builder. A widget written in this style will look wrong to anyone reading your module next to Odoo's.

Second, asyncComputed with { initial: [] } is genuinely useful and worth knowing about regardless. It gives a computed value that resolves asynchronously while rendering immediately with a placeholder. That is why this field shows an empty selection for a moment when the form opens, and why it does not need a loading state of its own.

The practical debugging consequence: a blank selection here has three possible causes that all look identical. The definitions are still loading, the property key does not exist in that definition, or the property exists but has no selection values. The optional chaining and the ?? [] fallback collapse all three into the same empty list.

Version compatibility

VersionStatusNotes
Odoo 19.0Not availableDoes not exist. No registration under this name in Odoo 19.
Odoo 20.0VerifiedIntroduced in Odoo 20. Verified against the shipped 20.0 source.

This widget does not exist before Odoo 20.

What is changing in Odoo 20

Introduced in Odoo 20. Odoo 19 has no registration under this name.

It arrives alongside another new registration in the same area, properties_definition, which gives the properties definition editor a widget name it did not previously have. The properties system is being built out in Odoo 20 more broadly, while the older property_tags widget is unchanged.

Because the file uses OWL 3 APIs that do not exist in Odoo 19, it could not be backported without being rewritten.

Common problems and fixes

SymptomCause and fix
The field renders no choices at allThree causes look identical: the definitions are still loading, the property key does not exist, or the property has no selection values. The optional chaining and empty fallback collapse all three. Check the property key against the definition on the named model, and confirm the property is of type selection.
Prop validation fails and the field does not renderOne of the three options is missing. All three props are declared as bare String with no optional marker. Provide property_model_name, property_field_name and property_name together.
The selection is empty for a moment when the form opensasyncComputed renders with an initial empty list while the definitions load. Expected behavior, not a fault.
The value does not group or filter usefully in reportsIt is stored as text against a definition on another record, not as a real selection field. Use a real selection field if reporting across records matters.

Property_selection widget vs the alternatives

WidgetBest forKey difference
property_selectionChoosing from a user-defined property vocabularyThree required options, and the only web file using OWL 3's props and computed API
selectionA stable list defined in codeSearchable, groupable and reportable
property_tagsA property that holds several tagsMultiple values rather than one choice
propertiesThe full set of properties on a recordRenders every property type, not one selection
badges_selectionA selection shown as badgesWorks on real selection fields, with filtering options

Use a real selection field when the list of values is stable and the same for every record; it is searchable, groupable and reportable, none of which a property value is. Use property_tags when the property is a tag set rather than a single choice. Reach for this widget only when the vocabulary genuinely must stay in the user's hands.

Frequently asked questions

What options does Odoo's property_selection widget need?+
All three: property_model_name, property_field_name and property_name. Their props are declared as bare String with no optional marker, so leaving any one out fails prop validation rather than degrading.
Why does property_selection show no choices?+
Three causes render identically: the definitions are still loading, the property key does not exist in that definition, or the property has no selection values. The source uses optional chaining with an empty-array fallback, which collapses all three into an empty list.
Is property_selection a good example of how to write an Odoo 20 widget?+
No. It is the only file in Odoo 20's web module importing a bare props from OWL and using computed() and asyncComputed(). 268 files use useProps() with the t type builder, which is the convention to follow.
Does property_selection exist in Odoo 19?+
No, it is new in Odoo 20, and it uses OWL 3 APIs that do not exist in Odoo 19, so it cannot be backported without a rewrite.

Properties that outgrew what they were for?

Properties are excellent while each record needs its own handful of fields, and a reporting problem the moment somebody wants to count them. We know where that line sits and move the vocabulary into real fields before it becomes a cleanup project.

Talk to an Odoo consultant

How this page was produced

Verified by reading addons/web/static/src/views/fields/properties/property_selection.js on the 20.0 branch of a local clone of the official Odoo repository, with the props declaration, the computed getters and loadFieldInfos quoted above. The OWL API counts come from listing files under addons/web/static/src/ on the same branch: 268 matching useProps(, 3 matching static props =, and exactly one importing a bare props from @odoo/owl, which is this file. The usage count comes from scanning every non-test XML file in Community, Enterprise and odoo/addons. Corrections welcome via our contact page.