Skip to main content
iVentureTeam

autosave_many2many_tax_tags

Taxes on a journal entry line are not just a value, they generate other lines. This widget saves the whole entry the moment they change, so the tax lines appear immediately instead of at the end.

Siddharth JambukiyaSiddharth JambukiyaOdoo Techno-Functional Consultant
August 27, 2026Updated August 27, 20266 min read
Technical nameautosave_many2many_tax_tags
Field typesmany2many
Viewslist, form
Moduleaccount, present wherever Invoicing or Accounting is installed
Used in core1 occurrence, the taxes column on journal entry lines in account
VersionsOdoo 20.0, Odoo 19.0
No-code setupNo. It is set in view XML and only makes sense on an accounting document line
Alternativesmany2many_tax_tags, many2many_tags, many2many_tags_avatar, monetary

What the autosaving tax tags does

Taxes in Odoo accounting are not a number written on a line. Choosing a tax makes the server generate additional lines on the same journal entry: the tax amount itself, and the tax grid allocations behind the tax report. Those lines are computed when the entry is saved.

On a form where the user is editing lines directly, that creates a lag. You pick a tax, nothing visibly happens, you carry on editing, and the tax lines appear only when you eventually save. Worse, the amounts you were reading while editing were incomplete.

This widget closes that gap. It is the standard tax tags field with a small piece of bookkeeping attached: whenever something changes that would alter the tax computation, it saves the whole journal entry so the server recomputes and the result appears immediately.

What this means for your team

The value is confidence during data entry. An accountant encoding a manual entry can see the tax lines and the running balance settle after each change, rather than discovering at save time that a tax was applied to the wrong account. On entries with several taxed lines, that is the difference between checking as you go and reconciling afterwards.

The cost is that the document is committed continuously. Every tax change writes the entry to the database, so there is no such thing as trying a tax and discarding it. For a draft entry that is usually fine, and it is the trade Odoo chose deliberately, but it is worth telling a team that expects a form to be a scratchpad until they press save.

There is also a performance note. Each of these saves is a full write plus recomputation of the entry. On an entry with many lines, rapid tax changes mean repeated round trips, which on a slow connection feels like the form stuttering. It is not a bug, it is the widget doing exactly what it was built to do.

Supported options in Odoo 19

The widget declares no options of its own. Its descriptor spreads the tax tags descriptor, which itself spreads the standard tags widget, so the options below are inherited two levels up. Read from the widget's source, the tax tags field and the tags field, Odoo 19.0.

OptionTypeWhat it does
color_fieldfieldInherited from the tags widget. Names an integer field used to color the tags.
no_createbooleanInherited. Removes creation from the dropdown so only existing taxes can be chosen.(default: false)
no_quick_createbooleanInherited. Removes creation from the typed text while keeping the popup form path.(default: false)
create_name_fieldfieldInherited. Field the typed text is written into when quick-creating a tag.
edit_tagsbooleanInherited from the tags widget. Makes clicking a tag open its record.(default: false)

The fields it watches are hardcoded. The widget reads balance, account_id, partner_id and tax_ids by literal name and declares no dependency on any of them, so all four have to be present in the view. In the core journal entry list they are; on a custom line view that omits one, the observer will fail rather than degrade quietly.

Working examples

The core usage, trimmed

<field name="tax_ids" widget="autosave_many2many_tax_tags"
       optional="hide"
       domain="[('type_tax_use', '=?', parent.invoice_filter_type_domain)]"
       context="{'active_test': True}"/>

Hidden by default as an optional column, with the tax type filtered to match the document. The autosave is not configurable and applies whenever the column is shown.

The companion fields it needs

<field name="balance"/>
<field name="account_id"/>
<field name="partner_id"/>
<field name="tax_ids" widget="autosave_many2many_tax_tags"/>

All four are read by name. None is declared as a dependency by the widget.

Without the autosave

<field name="tax_ids" widget="many2many_tax_tags"/>

The parent widget: same dropdown behavior, but tax lines only appear when the user saves the entry.

Four triggers, one save, and a condition people miss

The widget captures three values when it starts: the line's balance, its account and its partner. It then installs a record observer that runs on every change to the line, and compares the current values against the captured ones. If they differ and the line already carries at least one tax, it refreshes the captured values and saves the root record.

That extra condition is the part worth noticing. A line with no taxes can have its balance and account changed freely with no saving at all, because nothing tax-related would be recomputed. The autosave only becomes active once a tax is on the line, which keeps ordinary entry editing responsive.

Adding and removing taxes take a different route. The component's update method is wrapped so that after the tags are written, the root record is saved; and the delete handler is overridden to do the same after removing a tag. Both call the same save, so all four triggers converge on one behavior.

The save target is the model's root record rather than the line. On a journal entry form the line is a child of the entry, and tax lines are a property of the entry as a whole, so saving the line alone would not produce them. This is also why the effect is a full document write each time.

One inherited behavior is worth contrasting with its neighbor in the same list. The tax tags autocomplete this widget builds on always appends a Search more entry to the dropdown, even when the standard logic would omit it, while the account picker one column to the left suppresses that same entry unless you type a digit. Two adjacent columns on the same row, two opposite decisions, both deliberate.

Version compatibility

VersionStatusNotes
Odoo 20.0In developmentNot released. Byte-identical to Odoo 19 on the development branch.
Odoo 19.0VerifiedFirst version. Verified against the shipped source.
Odoo 18.0Not availableWidget does not exist. The column used the plain tax tags widget.
Odoo 17.0Not availableWidget does not exist.
Odoo 16.0Not availableWidget does not exist.

Upgrade note. The widget is new in Odoo 19. Earlier versions used the plain tax tags widget on that column, so an upgrade gains the autosave with the standard accounting views and nothing has to be migrated. Custom journal entry line views that set the tax column explicitly should switch the widget name to pick up the behavior.

What is changing in Odoo 20

Odoo 20 is expected at Odoo Experience in Brussels, 24 to 26 September 2026. The development branch is unstable and this can still change; we re-verify the page after release.

Byte-identical. The widget file matches Odoo 19 exactly on the development branch, including the hardcoded field names and the condition that the line must already carry a tax. Core still uses it on the journal entry line tax column.

Common problems and fixes

SymptomCause and fix
The entry saves itself while I am editingIntended. Changing taxes, or changing balance, account or partner on a line that already has a tax, saves the whole entry. Use the plain tax tags widget if a draft form should not commit continuously.
Changing the balance does not save anythingThe observer only acts when the line already carries at least one tax. Expected. Add a tax first if you want the recomputation.
An error about reading a field on the lineThe view does not load one of the four fields the widget reads literally. Include balance, account_id, partner_id and tax_ids in the line view.
The form feels slow with many linesEach trigger is a full write and recomputation of the entire entry. Enter taxes after the other line values are settled, or use the plain widget on high-volume screens.
Changes cannot be discardedThe entry has already been written to the database by the autosave. Correct the entry rather than discarding, or reset it to draft if it has been posted.
Search more never disappears from the dropdownInherited behavior. The tax tags autocomplete always appends that entry. Nothing to fix; it is deliberate and differs from the account column next to it.

Autosaving tax tags vs the alternatives

WidgetBest forKey difference
autosave_many2many_tax_tagsTax columns where the generated tax lines must appear while the entry is still being editedSaves the whole journal entry on every tax-relevant change instead of waiting for the user to save
many2many_tax_tagsThe same dropdown without continuous savingTax lines appear only when the user saves the entry
many2many_tagsAny ordinary many2many rendered as tagsNo accounting behavior and no forced Search more entry
many2many_tags_avatarTags representing peopleRenders avatars alongside the names
monetaryThe amounts the taxes act onA single currency-aware value rather than a relation

Use the plain tax tags widget when you want the dropdown behavior without the continuous writing, for example on a form users treat as a draft. Use this one where the tax result has to be visible while editing. And if the field is not a tax at all, the ordinary tags widget is the right base; nothing here generalizes beyond accounting lines.

Frequently asked questions

Why does my journal entry save itself?+
Because this widget saves the root record whenever a tax is added or removed, or when the line's balance, account or partner changes while the line already carries a tax. Tax lines are computed on the whole entry, so the save is what makes them appear.
Can I turn the autosave off?+
Not from XML. Use the plain many2many_tax_tags widget on that column instead; the dropdown behaves the same and the entry is written only when you save.
Which fields does it need in the view?+
Four, read by literal name and none declared as a dependency: balance, account_id, partner_id and tax_ids. The core journal entry list loads all of them.
Why does changing the account sometimes save and sometimes not?+
The observer only reacts when the line already has at least one tax. A line with no taxes can be edited freely without triggering anything.
Is it available before Odoo 19?+
No. It is new in Odoo 19, and it is byte-identical on the Odoo 20 development branch.

Taxes that reconcile the first time

Tax grids, repartition lines and the reports built on them are the part of Odoo Accounting that quietly diverges from what the tax office expects. We set up and verify tax configuration per country on Odoo 16 through 19.

Book a free consultation

How this page was produced

The wrapped update, the overridden delete, the record observer and its condition, the hardcoded field names and the root save were read from autosave_many2many_tax_tags.js on the Odoo 19.0 branch, with the inherited autocomplete behavior read from the tax tags field in the same module. The usage, its domain and its context come from account/views/account_move_views.xml. Version coverage comes from the absence of the file on 16.0, 17.0 and 18.0, and a byte comparison against the public development branch. Spotted an error? Tell us and we will correct the page.