odoo/enterprise#70371

Created by Accounting, Maira Salazar
Merged at dcf66222d3bcd1844ce55546ea9cb41e63c90d0b

Statuses:

Linked pull requests
label
odoo-dev:17.0-l10n_ee-kmd-inf-srma
head
0e5070b6aee299f932a3f99597777db4f772b653
merged
7 months ago by Accounting, de Wouters de Bouchout Jean-BenoƮt (jbw)
odoo/odoo odoo/enterprise
17.0 #180856 #70371
saas-17.2 #189756 #75216
saas-17.4 #189923 #75309
18.0 #190180 #75407

[IMP] l10n_ee_reports: rework KMD and KMD INF

The tax report (KMD report) and annex to the tax report (KMD INF report) for Estonia needed to be reworked to correct errors and fix rounding issues.

With this commit, the tax report:
1. Adds the balance_from_tags to allow auditing the report lines, since only aggregation was used before.
2. Fixes rounding issues by using the integer_rounding feature and adding rounding differences to the VAT closing entry.

This commit also rewrites the KMD INF report. It creates one report composed of two sections with different columns, using the custom engine to construct both parts.

Part A contains information on invoices issued, grouped by move_id and id, to allow showing multiple lines per invoice when different tax rates or special tax types are in one invoice. It only includes invoices with taxable supply at 22%, 20%, 9% and 5%. It excludes invoices of partners whose Tax ID is / and foreigner partners who have a Tax ID not starting by EE.

Part B contains information on invoices received, grouped by move_id. Each line showcases information about one invoice with taxable supply at 22%, 20%, 9% and 5%. It relies on a Tax ID starting with EE.

The reports follow the guidelines available in
https://www.emta.ee/en/business-client/taxes-and-payment/tax-returns-exchange-information/vat-return-forms-vd-and-vdp (forms valid from 01.01.2024 onwards).

task-3997203