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.
| Technical name | many2many_tags_salary_bank |
|---|---|
| Field types | many2many |
| Views | form |
| Module | hr |
| Used in core | 2 occurrences across 1 module: both bank account blocks of the employee form in hr |
| Versions | Odoo 20.0, Odoo 19.0 |
| No-code setup | No. Applied in XML; Studio does not list it |
| Alternatives | many2many_tags, many2many_tags_avatar, many2many_uom_tags |
What the Salary bank tags widget does
What this means for your team
Supported options in Odoo 19
| Option | Type | What it does |
|---|---|---|
color_field | field name | Inherited 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_create | boolean | Inherited: disables creating accounts from the dropdown entirely, both quick create and the dialog.(since Odoo 19.0) |
no_quick_create | boolean | Inherited: 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_edit | boolean | Inherited: removes the Create and Edit dialog path while keeping quick create.(since Odoo 19.0) |
create | domain | Inherited: a domain evaluated against the record that conditionally allows creation.(since Odoo 19.0) |
create_name_field | field name | Inherited 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_tags | boolean | Inherited 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_color | boolean | Inherited 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_threshold | number | Inherited: minimum typed characters before the dropdown searches; unset searches on focus.(since Odoo 19.0) |
placeholder_field | field name | Inherited: 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
The three overrides that do everything
Version compatibility
| Version | Status | Notes |
|---|---|---|
| Odoo 20.0 | Partial / changed | Not released. Rebased onto plain tags, color_field dropped, focus auto-save added, create field renamed; see below. |
| Odoo 19.0 | Verified | Widget introduced with the multi-account salary split feature. Verified against the shipped source. |
| Odoo 18.0 | Not available | Widget does not exist; employee bank accounts rendered as plain tags. |
| Odoo 17.0 | Not available | Widget does not exist. |
| Odoo 16.0 | Not available | Widget 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
Common problems and fixes
| Symptom | Cause and fix |
|---|---|
| No percentage or amount prefix on the tags | The 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 changes | The 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 employee | Core 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 number | nameCreateField 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 picker | The 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 prefix | getTagProps only prefixes percentage amounts of 100 or less. Fix the split data; the guard is intentional. |
Salary bank tags widget vs the alternatives
| Widget | Best for | Key difference |
|---|---|---|
many2many_tags_salary_bank | Employee bank account tags carrying their salary split | Prefixes each tag with the account's percentage or fixed amount and saves the form after tag dialogs |
| many2many_tags | General-purpose tag fields anywhere in Odoo | No salary annotations, no parent-record gate, standard save behavior |
| many2many_tags_avatar | People tags with avatars, such as assignees | Renders contact avatars instead of split prefixes |
| many2many_uom_tags | Unit-of-measure tags with conversion hints | Same annotate-the-tag pattern but for unit conversions, in the uom module |
Frequently asked questions
What do the percentages on employee bank account tags mean?+
Why do the prefixes only appear with several bank accounts?+
Why did Odoo save my whole employee form when I edited a bank account tag?+
Can I use many2many_tags_salary_bank on another model?+
What changes for this widget in Odoo 20?+
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