Skip to main content
iVentureTeam

many2many_tags_salary_bank

On the employee form, bank account tags can read (30%) BNP Paribas ...1234. That prefix is many2many_tags_salary_bank, a tags widget that annotates each account with its salary split and quietly saves your whole form when you close a tag's dialog.

Siddharth JambukiyaSiddharth JambukiyaOdoo Techno-Functional Consultant
August 26, 2026Updated August 26, 20266 min read
Technical namemany2many_tags_salary_bank
Field typesmany2many
Viewsform
Modulehr
Used in core2 occurrences across 1 module: both bank account blocks of the employee form in hr
VersionsOdoo 20.0, Odoo 19.0
No-code setupNo. Applied in XML; Studio does not list it
Alternativesmany2many_tags, many2many_tags_avatar, many2many_uom_tags

What the Salary bank tags widget does

Odoo 19 lets an employee's salary be split across bank accounts, by percentage or fixed amount. The employee form shows those accounts as tags, and this widget's job is to make each tag carry its share: (30%) before the account's display name for percentage splits, (1500.00$) style for fixed amounts.

It extends the color-editable variant of many2many_tags and overrides getTagProps to build the prefixed text. The amounts come along invisibly: a relatedFields declaration injects the salary amount, the percentage flag and the currency symbol into every tag record fetched, so the view needs no extra columns.

The prefix has a gate: the widget reads has_multiple_bank_accounts off the parent employee record, by literal name, and only decorates tags when it is truthy. One account means no split, so tags render clean.

What this means for your team

Salary distribution is a payroll-critical setting: get a split wrong and someone's rent account receives the wrong amount at the end of the month. Encoding the split into the tag itself means HR sees the current distribution every time they glance at the form, not only inside the account records.

The aggressive save behavior serves the same goal. Editing an account through its tag dialog can change the split; the widget responds by saving the whole employee record and reloading it, so the percentages you see are always post-recompute, never stale. The cost is that unrelated pending edits on the form get saved along the way, worth knowing before you open a tag mid-edit.

Core also wraps the field with guardrails: it is read-only until the employee record is saved once, and quick-create from typed text is disabled in favor of the full account dialog, since a bank account needs more than a name to be payroll-ready.

Supported options in Odoo 19

The widget adds no options of its own; the surface below is inherited from the tags family descriptor it spreads, verified against the Odoo 19.0 source of both files. Two inherited entries deserve asterisks: create_name_field is overridden internally, and the color editing UI is neutralized by the forced base templates.

OptionTypeWhat it does
color_fieldfield nameInherited integer field driving tag colors; core passes 'color'. The tint applies, but the click-to-edit-color UI never renders because the widget forces the plain tags templates. Filtered out of the options entirely on the Odoo 20 branch.(since Odoo 19.0)
no_createbooleanInherited: disables creating accounts from the dropdown entirely, both quick create and the dialog.(since Odoo 19.0)
no_quick_createbooleanInherited: keeps record creation but forces the full dialog. Core passes it on both usages, since bank accounts need more than a label to exist.(since Odoo 19.0)
no_create_editbooleanInherited: removes the Create and Edit dialog path while keeping quick create.(since Odoo 19.0)
createdomainInherited: a domain evaluated against the record that conditionally allows creation.(since Odoo 19.0)
create_name_fieldfield nameInherited but dead here: the widget's extractProps overwrites the resulting prop with acc_number unconditionally, so quick-created accounts always store the typed text as their account number.(since Odoo 19.0)
edit_tagsbooleanInherited from the color-editable variant: clicking a tag opens the account's form dialog, gated by the can_write attribute. Core enables it, which is what pairs with the widget's save-and-reload wrapper. Replaced by on_tag_click on the Odoo 20 branch.(since Odoo 19.0)
no_edit_colorbooleanInherited from the color-editable variant and moot here: the forced base templates already remove the color editing UI it would disable.(since Odoo 19.0)
search_thresholdnumberInherited: minimum typed characters before the dropdown searches; unset searches on focus.(since Odoo 19.0)
placeholder_fieldfield nameInherited: a char field on the record whose value serves as the dynamic placeholder.(since Odoo 19.0)

Two inherited options are traps here. create_name_field is read by the base extractProps but this widget then overwrites the result with acc_number unconditionally. And while color_field still fetches colors for tag styling, the click-to-edit-color UI never appears because the widget forces the plain tags templates over the color-editable ones.

Working examples

How core applies it (employee form, multi-account block)

<field name="bank_account_ids" widget="many2many_tags_salary_bank"
       context="{'default_partner_id': work_contact_id}"
       options="{'color_field': 'color', 'no_quick_create': True, 'edit_tags': True}"
       readonly="not id"/>

Each piece is deliberate: the context routes new accounts to the employee's work contact, no_quick_create forces the full dialog, edit_tags makes a tag click open the account for editing, and readonly="not id" disables the field until the employee exists.

The visible result

Percentage split:  (30%) BNP Paribas ...1234   (70%) ING ...5678
Fixed amount:      (1500.00$) Chase ...4321
Single account:    Chase ...4321

Percentages above 100 are treated as invalid and render without the prefix; fixed amounts print with the account currency's symbol when available.

The three overrides that do everything

Three overrides carry all the behavior, and each has an edge worth knowing.

getTagProps builds the label. It starts from the base tag props and rewrites text. Percentage mode only prefixes when the amount is at most 100, using a whole-number format; amount mode prints two decimals plus the currency symbol when one is loaded. If the parent's has_multiple_bank_accounts field is missing from the view, the gate reads undefined and prefixes never show, silently.

openMany2xRecord is wrapped. The original opens the account dialog; the wrapper awaits it, then checks whether the form's root record is dirty, saves it if so, and reloads the record. That is what keeps split percentages coherent after edits, and also what commits unrelated pending changes on the employee form as a side effect.

extractProps hardcodes the create field. After delegating to the base, it sets nameCreateField = "acc_number", so any created account lands with the typed text as its number rather than a name. In core this path is mostly moot, quick create is disabled in the views, but custom views omitting no_quick_create will feel it.

Templates are forced backward. The class pins web.Many2ManyTagsField and a TagsList pinned to web.TagsList, undoing the color-editable variant's templates. Colors still tint the tags via color_field; the editing affordance is what disappears.

Version compatibility

VersionStatusNotes
Odoo 20.0Partial / changedNot released. Rebased onto plain tags, color_field dropped, focus auto-save added, create field renamed; see below.
Odoo 19.0VerifiedWidget introduced with the multi-account salary split feature. Verified against the shipped source.
Odoo 18.0Not availableWidget does not exist; employee bank accounts rendered as plain tags.
Odoo 17.0Not availableWidget does not exist.
Odoo 16.0Not availableWidget does not exist.

Upgrade note. The widget and the salary split fields it displays are 19-new; there is nothing to migrate from earlier versions. Multi-bank salary setups arriving from 18 gain the display automatically once the data is in place.

What is changing in Odoo 20

Odoo 20 is expected at Odoo Experience in Brussels, 24 to 26 September 2026, and the development branch can change until release. This widget moves more than most:

Rebased off the color-editable variant onto plain Many2ManyTagsField, with color_field explicitly filtered out of the supported options; the employee views switch their tag click behavior to the new on_tag_click: 'open_form' option and drop edit_tags.

Focus saves the record. A new onFocusIn override saves the employee record the moment the field is focused on an unsaved form, replacing 19's readonly="not id" guard in the views, the field becomes usable immediately at the price of an implicit save.

The create field renames from acc_number to account_number, tracking the server-side field rename on bank accounts. We re-verify all three against the shipped release.

Common problems and fixes

SymptomCause and fix
No percentage or amount prefix on the tagsThe parent's has_multiple_bank_accounts is false or not loaded; the widget reads it by literal name from the employee record. Ensure the field is in the view and the employee has more than one account with a split defined.
Editing an account through its tag saved my other form changesThe openMany2xRecord wrapper saves the whole record when dirty, then reloads, to refresh the splits. Expected; finish or discard unrelated edits before opening a tag dialog.
The field is grayed out on a new employeeCore sets readonly="not id", disabling it until the record is saved once. Save the employee first; the Odoo 20 branch replaces this with an automatic save on focus.
A quick-created account has its name in the account numbernameCreateField is hardcoded to acc_number, so typed text becomes the number. Keep no_quick_create enabled, as core does, and create accounts through the full dialog.
Clicking a tag does not open the color pickerThe widget forces the plain tags templates; the color editing UI is removed by design, and edit_tags routes clicks to the account form instead. Edit colors from the account records directly if needed; the tint via color_field still applies.
A percentage over 100 shows no prefixgetTagProps only prefixes percentage amounts of 100 or less. Fix the split data; the guard is intentional.

Salary bank tags widget vs the alternatives

WidgetBest forKey difference
many2many_tags_salary_bankEmployee bank account tags carrying their salary splitPrefixes each tag with the account's percentage or fixed amount and saves the form after tag dialogs
many2many_tagsGeneral-purpose tag fields anywhere in OdooNo salary annotations, no parent-record gate, standard save behavior
many2many_tags_avatarPeople tags with avatars, such as assigneesRenders contact avatars instead of split prefixes
many2many_uom_tagsUnit-of-measure tags with conversion hintsSame annotate-the-tag pattern but for unit conversions, in the uom module

This widget only earns its keep on hr.employee bank accounts with salary splits. Everywhere else in the tags family, the general-purpose variants below cover the spectrum from plain tags to avatars.

Frequently asked questions

What do the percentages on employee bank account tags mean?+
They are the salary distribution: each tag shows the share of the wage paid into that account, as a percentage like (30%) or a fixed amount with a currency symbol. The many2many_tags_salary_bank widget reads them from the account's salary fields.
Why do the prefixes only appear with several bank accounts?+
The widget checks the employee's has_multiple_bank_accounts field and skips the decoration when there is a single account, where a split is meaningless. The field must be loaded in the view for the check to work.
Why did Odoo save my whole employee form when I edited a bank account tag?+
By design: after a tag's dialog closes, the widget saves the form if it has unsaved changes and reloads it so the displayed splits are recomputed. Pending edits elsewhere on the form are committed as part of that save.
Can I use many2many_tags_salary_bank on another model?+
Only with matching plumbing: the tag records need employee_salary_amount, its percentage flag and currency_symbol, and the parent needs has_multiple_bank_accounts. Without them the widget degrades to plain tags. It ships in the hr module.
What changes for this widget in Odoo 20?+
The development branch rebases it onto the plain tags widget, removes color_field from its options, saves unsaved employee records when the field is focused, and renames the quick-create target from acc_number to account_number.

Payroll-grade employee data in Odoo?

We implement HR and payroll flows where salary splits, bank details and approvals are airtight: multi-account distributions, validation rules, and audit-friendly forms your payroll team can trust, on Odoo 16 to 19.

Review my payroll setup

How this page was produced

This page was verified by reading many2many_tags_salary_bank.js in the Odoo 19.0 hr module and on the development branch, the tags family descriptors in web for the inherited option surface, and both employee form usages in hr_employee_views.xml in 19 and on the branch. Corrections welcome via our contact page.