account_tax_repartition_line_factor_percent
Tax distributions sometimes have to be a third of something. This widget keeps twelve decimals so the arithmetic survives, then hides the trailing zeros so the screen stays readable.
| Technical name | account_tax_repartition_line_factor_percent |
|---|---|
| Field types | float |
| Views | list, form |
| Module | account, present wherever Invoicing or Accounting is installed |
| Used in core | 1 occurrence, the tax distribution lines on the tax configuration form in account |
| Versions | Odoo 20.0, Odoo 19.0, Odoo 18.0 |
| No-code setup | No. Studio offers the plain decimal field; this variant is set in view XML |
| Alternatives | float, monetary, percentage, float_without_trailing_zeros |
What the tax factor field does
What this means for your team
Supported options in Odoo 19
| Option | Type | What it does |
|---|---|---|
digits | list | Inherited from the float widget, but with a different default: twelve decimals instead of the field's own precision. Override it in the view if you genuinely need fewer.(default: [16, 12]) |
enable_formatting | boolean | Inherited. Set it to false to remove thousands separators and locale formatting from the displayed value.(default: true) |
step | number | Inherited. Step of the number input's spinner when the field is rendered as a number input. |
type | string | Inherited. Set to number to render a real HTML number input. |
human_readable | boolean | Inherited. Compact display for large numbers. Meaningless on a percentage and best left alone here.(default: false) |
The precision is a default, not a lock. Passing a digits option in the view overrides the twelve decimal default, and the rounding applied when parsing follows whatever precision is in effect. Lowering it will make a three way split stop adding up, which is the situation the widget exists to prevent.
Working examples
Why the display never drops below two decimals
Version compatibility
| Version | Status | Notes |
|---|---|---|
| Odoo 20.0 | In development | Not released. Behavior identical on the development branch; only the props syntax changes. |
| Odoo 19.0 | Verified | Verified against the shipped source. Byte-identical to Odoo 18. |
| Odoo 18.0 | Verified | First version. Same precision, trimming and rounding. |
| Odoo 17.0 | Not available | Widget does not exist. The field used the plain float widget. |
| Odoo 16.0 | Not available | Widget does not exist. |
Upgrade note. The widget arrived in Odoo 18 and the Odoo 18 and Odoo 19 files are byte-identical, so views carry over untouched. On Odoo 17 and earlier the repartition percentage used the plain float field, which means a database upgraded from 17 gains the precision handling automatically with the standard accounting views.
What is changing in Odoo 20
Common problems and fixes
| Symptom | Cause and fix |
|---|---|
| Distributions do not add up to a hundred | The precision was lowered with a digits option, so a repeating fraction is being truncated. Remove the override and let the twelve decimal default apply. |
| The value shown differs from the value saved | Something bypassed the widget's parser, for example an import or an API write. Round to the field's precision on the writing side; the widget only governs what the user types. |
| Fifty percent shows as 50.00 rather than 50 | Intended. The trimming never removes the last two decimals, so columns stay aligned. Nothing to fix. |
| Typing an expression does nothing | Expression input comes from the base float widget and needs the leading equals sign. Type = 100/3 rather than 100/3. |
| The column is very wide | A value genuinely needs many decimals, so nothing is trimmed. Expected on repeating fractions. Widen the column or accept the wrap. |
| Missing widget error | The accounting module is not installed in that database. Install Invoicing or Accounting, or use the plain float widget. |
Tax factor field vs the alternatives
| Widget | Best for | Key difference |
|---|---|---|
account_tax_repartition_line_factor_percent | Tax distribution percentages that must stay exact through division | Twelve decimal default precision, trailing zeros trimmed to a two decimal floor, and typed arithmetic rounded on save |
| float | Ordinary decimal values | Uses the field's own precision and does not trim trailing zeros |
| monetary | Amounts of money | Currency aware, with the currency's own rounding |
| percentage | Ratios stored as a fraction of one | Multiplies for display and appends a percent sign |
| float_without_trailing_zeros | Decimals that should read as short as possible | Trims all trailing zeros with no two decimal floor |
Frequently asked questions
Why does the field keep twelve decimals?+
Why does fifty show as 50.00?+
Can I type a fraction into the field?+
Does it support the usual float options?+
Which versions have it?+
Tax setup that reconciles to the cent
Repartition lines, tax grids and the reports built on them are where a small configuration decision becomes a filing correction. We configure and verify Odoo tax setups per country, on versions 16 through 19.
Book a free consultation