Dynamic dropdown widget that supports resolving options from backend of:
> - fields.Char > - fields.Integer > - fields.Selection
NOTE: This widget is not intended to extend fields.Selection, but to filter selection values. For fully-dynamic set of options, use fields.Char instead.
auto_awesome What this module does
AI-generated from the code · Odoo 19.0Adds a new "Dynamic Dropdown" field widget for Odoo forms. It lets developers show a dropdown whose options are fetched from the server, optionally depending on another field on the same form.
This module is a technical building block for Odoo developers rather than a ready-made business feature. It registers a new field widget called "Dynamic Dropdown" that can be used on char, integer and selection fields.
When a form is opened, the widget calls a method on the record's model to get the list of available options, and shows them in a dropdown. The method name is configured in the field's options, and extra context can be passed, for example the value of another field on the form. If that other field changes, the options are fetched again.
Business rules added by the widget: - If the current value is no longer among the options returned by the server, the field is automatically cleared. - For integer fields, a non-numeric or zero selection is rejected as invalid. - Empty selections are stored as no value.
To demonstrate how it works, the module ships a demo setup on the ir.filters model: a manual integer field named "Dropdown Integer" is added to the filter form, and a demo method returns a small list of options, adding one extra option when the administrator is among the selected users. This demo is only installed with demo data and is meant as an example, not as a business feature.
Depends on
Required by other modules
Models and fields (1)
- ir.filters · extends an existing model
Text generated by AI (DeepSeek) from reading the Odoo 19.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub
Availability by version
Reviewed: 2026-11-03Confirmation status: 8 confirmed, 1 with no information of 9 versions.
Sources · Odoo 13.0
Confirmed on 2026-11-03 in branch 13.0 of OCA/web.
terminal Installation and usage
OCA documentation · Odoo 19.0Usage
Source · Odoo 19.0@api.model
def method_name(self):
values = [
('value_a', 'Title A'),
]
if self.env.context.get('depending_on') == True:
values += [
('value_b', 'Title B'),
]
return values<field
name="other_field"
/>
<field
name="char_field"
widget="dynamic_dropdown"
options="{'values':'method_name'}"
context="{'depending_on': other_field}"
/>DEMO
On User defined filters added new field to show the feature, it is called Dropdown Integer. If any user selected just One option shoud appear, but if Mitchell Admin it should be possible to select option One and Two.
No verified information in OCA: Installation, Configuration.
Installation instructions, the distribution package, dependencies and configuration steps are not shown because they have not yet been verified in the module documentation for any version.
Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.