From a72299fef1f4e46be37c7f1db3f0d6bfb246700c Mon Sep 17 00:00:00 2001 From: "Guillaume (guva)" Date: Wed, 19 Jul 2023 08:35:45 +0000 Subject: [PATCH] [FIX] account: tax details query When having a cash rounding line on an invoice, base amount is taken twice into account in the tax report when grouping by account > tax or tax > account. Steps: - Activate cash rounding, and create one with 0.05 rounding, method 'HALF_UP' and 'biggest_tax' strategy - Create an invoice with a product line with unit price 1.24$, tax 15% (included in price) - Select the rounding method created above. - A rounding line for tax 15.0% and 0.02$ should have been created - Go to tax report and group by Account->Tax or Tax->Account -> Base amount is 2.48 instead of 1.24 opw-3336398 closes odoo/odoo#130375 X-original-commit: 34721726676dbee8b13dc19f449e5307140b6086 Related: odoo/enterprise#44934 Signed-off-by: Laurent Smet (las) Signed-off-by: Guillaume Vanleynseele (guva) --- addons/account/models/account_move_line_tax_details.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/account/models/account_move_line_tax_details.py b/addons/account/models/account_move_line_tax_details.py index a1a133c4d3d..8bc7ddf9d0c 100644 --- a/addons/account/models/account_move_line_tax_details.py +++ b/addons/account/models/account_move_line_tax_details.py @@ -392,6 +392,7 @@ class AccountMoveLine(models.Model): tax_line.tax_repartition_line_id, tax_line.company_id, + tax_line.display_type AS display_type, comp_curr.id AS company_currency_id, comp_curr.decimal_places AS comp_curr_prec, curr.id AS currency_id, @@ -457,6 +458,7 @@ class AccountMoveLine(models.Model): sub.base_line_id, sub.tax_line_id, + sub.display_type, sub.src_line_id, sub.tax_id,