Skip to main content
iVentureTeam

account_type_selection

The Type dropdown on an Odoo account is not a flat list. The account_type_selection widget buckets every account type under Balance Sheet and Profit & Loss headings so accountants pick from a structured tree instead of a 15 item flat list.

Siddharth JambukiyaSiddharth JambukiyaOdoo Techno-Functional Consultant
August 24, 2026Updated August 24, 20265 min read
Technical nameaccount_type_selection
Field typesselection (many2one also accepted through the base selection widget)
Viewsform, list
Moduleaccount
Used in core3 occurrences across 1 module: the account form and the chart of accounts list in account
VersionsOdoo 20.0, Odoo 19.0, Odoo 18.0, Odoo 17.0, Odoo 16.0
No-code setupNo. Applied via the widget attribute in view XML
Alternativesselection, radio, selection_badge

What the Account Type selector does

The account_type_selection widget is a specialized version of the standard selection widget used on exactly one field that matters: account_type on account.account. Instead of a flat dropdown of all account types, it renders a grouped menu with two section headers, Balance Sheet and Profit & Loss, and six groups underneath: Assets, Liabilities, Equity, Income, Expense and Other.

The grouping logic is simpler than it looks. The component takes the field's selection choices and filters them by string prefix on the stored value: everything starting with asset lands under Assets, liability under Liabilities, equity under Equity, income under Income, expense under Expense, and off_balance under Other. That is the whole algorithm; there is no configuration, no mapping table, and no option to change the buckets.

What this means for your team

For finance teams, the grouped dropdown mirrors how a balance sheet and P&L are actually structured, which makes picking the right type during chart of accounts setup much less error prone. A bookkeeper choosing between Current Assets and Non-current Assets sees both under the Assets heading rather than scanning an alphabetical list.

The practical caveat appears when you customize. If a developer adds a new value to the account_type selection whose key does not start with one of the six recognized prefixes, the widget filters it out of every group and the value becomes unselectable from the UI even though it is perfectly valid at the ORM level. Records can still hold the value through imports or code, which produces the confusing situation of a type you can see on saved accounts but cannot pick.

Supported options in Odoo 19

The widget declares no options of its own. It spreads the base selectionField descriptor, so the only declared option is inherited from the base selection widget, and as on the base widget it is declared but never consumed.

OptionTypeWhat it does
placeholder_fieldfield nameInherited from the base selection widget, which declares it as a Studio visible option, but the base widget's extractProps never reads it, so setting it has no effect here either. A plain placeholder attribute on the field works instead.(since Odoo 19.0)
Grouping is hardcoded in the component. There is no option to rename sections, reorder groups, or register additional prefixes; any of that requires overriding the component and its template.

Working examples

<!-- The core usage on the account form (account module) -->
<field name="account_type" widget="account_type_selection"/>

<!-- The same widget works in the chart of accounts list view -->
<field name="account_type" widget="account_type_selection"/>

Because the prefixes are hardcoded, reusing the widget on your own selection field only produces a sensible result if your keys follow the same naming convention, for example asset_custom_pool lands under Assets purely because of its prefix.

How the grouping is built, and what changed in Odoo 19

In Odoo 16 through 18 the component overrode a hierarchyOptions getter that fed a native HTML select with optgroup style headers, and the Other group matched only the exact value off_balance. Odoo 19 rewrote it: the component now inherits the SelectMenu based template of the base selection widget and injects sections and groups arrays in setup(), and the Other group now matches by startsWith('off_balance') like every other bucket.

One inherited subtlety is worth knowing: the base selection widget hardcodes autosave: true when the view type is kanban, and in Odoo 19 its readonly label lookup crashes on a stored value that is no longer in the selection. Both behaviors pass straight through to this widget because the descriptor is spread unchanged.

Version compatibility

VersionStatusNotes
Odoo 20.0In developmentNot released. The development branch file is byte-identical to 19.0 at the time of writing; see below.
Odoo 19.0VerifiedVerified against the shipped source. SelectMenu rewrite with real section headers.
Odoo 18.0VerifiedNative select with optgroup style hierarchy via the hierarchyOptions getter.
Odoo 17.0VerifiedSame native select implementation as 18.0.
Odoo 16.0VerifiedSame hierarchy getter; the Other group matched only the exact value off_balance.
The widget exists unchanged in name and purpose since Odoo 16. Upgrades are safe; only the rendering technology changed in 19.0, from a native select with optgroups to the SelectMenu component.

What is changing in Odoo 20

Odoo 20 is expected at Odoo Experience in Brussels, 24 to 26 September 2026. The changes below are read from the public development branch and are not final until release.

The account_type_selection.js file on the development branch is byte-identical to the shipped Odoo 19 source at the time of writing: same sections, same prefix filters, no new options. Unless something lands before the release freeze, this page applies to Odoo 20 as is. We re-verify after the release.

Common problems and fixes

SymptomCause and fix
A custom account type value does not appear in the dropdownThe widget buckets choices by value prefix. A selection key that does not start with asset, liability, equity, income, expense or off_balance is filtered out of every group. Name custom selection keys with one of the six recognized prefixes, for example asset_custom, or drop the widget attribute to fall back to the flat selection dropdown.
The dropdown shows a flat list without Balance Sheet and Profit and Loss headersThe field is rendered by the plain selection widget, not account_type_selection. This happens on custom views that forgot the widget attribute. Add widget="account_type_selection" to the field element in the view XML.
Saved accounts show a type that cannot be selected manuallyThe value was written by an import or by code. The ORM accepts any valid selection key even when the widget cannot display it in a group. Fix the key naming so the prefix matches a group, or correct the imported values with a server action.

Account Type selector vs the alternatives

WidgetBest forKey difference
account_type_selectionThe account Type dropdown on the chart of accountsBuckets choices under Balance Sheet and Profit and Loss headers by value prefix
selectionAny ordinary selection fieldFlat dropdown, no sections, no prefix filtering surprises
radioShort selections where all choices should be visible at onceRenders every choice as a radio button instead of a dropdown
selection_badgeSelections styled as clickable badgesInline badge buttons, better for two to five choices

Use account_type_selection only when your selection keys follow the balance sheet and P&L prefix convention. For any other grouped selection need, the standard widgets below behave more predictably.

Frequently asked questions

Which field uses account_type_selection in Odoo?+
Only account_type on account.account, in the account form view and the chart of accounts list view. It is applied through the widget attribute in the account module's view XML.
Can I add my own group or section to the dropdown?+
Not through options. The two sections and six groups are hardcoded in the component's setup(). Adding a group means extending the component and its template in a custom module.
Why does my custom account type not show up in the Type dropdown?+
The widget assigns choices to groups by checking whether the stored key starts with asset, liability, equity, income, expense or off_balance. A key outside those prefixes belongs to no group and is dropped from the menu entirely.
Does account_type_selection work on other models?+
Technically yes, on any selection field, since it spreads the base selection descriptor. But the grouping only makes sense if your selection keys follow the same prefix convention as account types.

Chart of accounts setup slowing your close down?

Wrong account types ripple into every report: balance sheets that do not balance and P&L lines in the wrong place. We restructure charts of accounts, fix imported account types in bulk, and localize Odoo accounting for your country, on Odoo 16 through 19.

Talk to an Odoo accounting expert

How this page was produced

Options and behavior were read from account_type_selection.js in the Odoo 19.0 account module source, including the setup() prefix filters and the spread of the base selectionField descriptor, and compared against the 16.0 and 18.0 files to confirm the SelectMenu rewrite. The Odoo 20 section is a diff of the same file on the public development branch. Usage counts come from a scan of all core view XML on 19.0. Spot an error? Tell us via our contact page and we will fix it within a day.