HR Expense Tax Distribution

In standard Odoo, an expense record accepts a single set of taxes
applied to the full total amount. This works well when a receipt is
entirely subject to one VAT rate, but breaks down for mixed receipts
where different line items are taxed at different rates.
A typical example in France is a restaurant bill, where the
applicable VAT rates depend on what was consumed:
- 5.5 % on food (solid items)
- 10 % on non-alcoholic beverages
- 20 % on alcoholic beverages
With the standard module, the user is forced to pick a single tax for
the whole amount, which leads to an incorrect tax breakdown in the final
accounting entry and, consequently, to wrong VAT reporting figures.
This module solves the problem by introducing tax distribution lines
on the hr.expense form. When an expense carries more than one tax,
the user can split the total receipt amount across as many distribution
lines as needed — one per applicable tax rate. Each line holds:
- the tax that applies to that portion of the receipt,
- the base amount (tax excluded) entered by the user,
- the tax amount and the total (tax included) computed
automatically.
A validation constraint ensures that the sum of the distribution line
totals equals the expense total before the expense report can be
submitted.
When the expense report is posted, the accounting entry is built from
the distribution lines instead of the single tax_ids / total pair,
producing a correct and auditable VAT breakdown for each applicable
rate.
The module is fully backward compatible: expenses with a single tax
or no distribution lines behave exactly as in standard Odoo.
Table of contents
This module depends on the standard hr_expense module. No
third-party dependency is required.
Install the module in the usual way (Apps menu or
-i hr_expense_tax_distribution on the command line). The Tax
Distribution table appears automatically on the expense form as soon as
the module is installed — no migration of existing data is needed.
No specific configuration is required after installation.
The Tax Distribution table is displayed automatically on the expense
form whenever distribution lines exist on the record. Distribution lines
are generated automatically when more than one tax is added to the
Taxes field (via the tax_ids onchange), but they can also be
created or modified manually.
Purchase taxes
Only taxes with Tax Scope set to Purchase or All are available
in the distribution line Tax field. Make sure your VAT rates are
configured accordingly (Accounting > Configuration > Taxes).
Company currency
All amounts in the distribution lines are expressed in the expense
currency (currency_id), consistent with the standard Total field
on the expense. Multi-currency conversion is handled by the existing
Odoo expense mechanism and is not affected by this module.
Typical workflow — restaurant receipt (France)
Consider a receipt for 86.75 € (tax included) with three different VAT
rates:
| Item |
Base (HT) |
Rate |
Tax |
Total (TTC) |
| Food |
50.00 EUR |
5.5 % |
2.75 EUR |
52.75 EUR |
| Non-alcoholic beverages |
20.00 EUR |
10 % |
2.00 EUR |
22.00 EUR |
| Alcoholic beverages |
10.00 EUR |
20 % |
2.00 EUR |
12.00 EUR |
| Total |
80.00 EUR |
|
6.75 EUR |
86.75 EUR |
Step-by-step
Go to Expenses > My Expenses and create a new expense (or open an
existing draft one).
Fill in the standard fields: Product, Total (86.75),
Employee, Date, etc.
In the Taxes field, add all the VAT rates that appear on the
receipt (e.g. TVA 5.5%, TVA 10%, TVA 20%).
As soon as more than one tax is present, the Tax Distribution
table appears automatically below the Taxes field, with one
pre-created line per tax.
For each line in the Tax Distribution table, enter the Base
Amount (Tax Excl.) — the portion of the receipt that is subject to
that particular rate.
The Tax Amount and Total (Tax Incl.) columns are computed and
updated instantly.
Verify that the sum of the Total (Tax Incl.) column equals the
expense Total field. Odoo will block submission if there is a
discrepancy.
Submit and approve the expense report as usual.
Result in the accounting entry
Instead of a single expense line with a blended tax, the generated
journal entry contains one base line and one tax line per distribution
entry, providing an accurate and auditable VAT breakdown that feeds
correctly into the tax declaration (e.g. French CA3 return).
Single-tax expenses
If the expense has only one tax in the Taxes field, the Tax
Distribution table is not shown and the standard Odoo behaviour applies
unchanged. You can still manually add a distribution line if needed (for
instance, to split a single-rate receipt across two accounts), but this
is an edge case.
Manual adjustments
Distribution lines can be added, removed, or edited manually at any time
while the expense is in draft or submitted state (subject to the usual
edit permissions). Use the handle icon to reorder them.
- Analytic distribution per line — the current implementation copies
the analytic_distribution from the parent expense to every
distribution line. A future improvement could allow setting a distinct
analytic distribution on each tax distribution line.
- Automatic total update — when the user adjusts the distribution
lines, the expense Total field is not automatically recalculated.
The user must ensure consistency manually. A future improvement could
offer a Recompute Total helper button.
- Import / OCR integration — receipts parsed by the Odoo AI/OCR
feature do not currently populate distribution lines. Integration with
the attachment extraction pipeline is a possible future improvement.
Bugs are tracked on GitHub Issues.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
feedback.
Do not contact contributors directly about support or help with technical issues.
This module is maintained by the OCA.
OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
Current maintainer:

This module is part of the OCA/hr-expense project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.