From 01d607906ad9b3bd668747f4d1d67cfd5fc1ebf1 Mon Sep 17 00:00:00 2001 From: oco-odoo Date: Wed, 23 Nov 2022 09:27:16 +0000 Subject: [PATCH] [FIX] l10n_th: fix tax report formulas Some formulas had not been properly converted to the new format introduced in 16.0. The report crashed when opening it. OPW 3064180 X-original-commit: e0cd7020580bc34d5c31bc327361def534d04272 Part-of: odoo/odoo#107171 --- .../l10n_ro/data/account_tax_report_data.xml | 12 ++++++------ .../l10n_th/data/account_tax_report_data.xml | 18 ++++++++++++++++-- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/addons/l10n_ro/data/account_tax_report_data.xml b/addons/l10n_ro/data/account_tax_report_data.xml index be552fdd607..12e6130ba68 100644 --- a/addons/l10n_ro/data/account_tax_report_data.xml +++ b/addons/l10n_ro/data/account_tax_report_data.xml @@ -301,7 +301,7 @@ model="account.report.expression"> balance aggregation - 0.5.balance * tax_ro_baza_rd242.balance + 0.5 * tax_ro_baza_rd242.balance @@ -340,7 +340,7 @@ model="account.report.expression"> balance aggregation - 0.5.balance * tax_ro_baza_rd252.balance + 0.5 * tax_ro_baza_rd252.balance @@ -379,7 +379,7 @@ model="account.report.expression"> balance aggregation - 0.5.balance * tax_ro_baza_rd262.balance + 0.5 * tax_ro_baza_rd262.balance @@ -1382,7 +1382,7 @@ balance aggregation - tax_ro_baza_rd241.balance + 0.5.balance * tax_ro_baza_rd242.balance + tax_ro_baza_rd241.balance + 0.5 * tax_ro_baza_rd242.balance @@ -1417,7 +1417,7 @@ balance aggregation - tax_ro_baza_rd251.balance + 0.5.balance * tax_ro_baza_rd252.balance + tax_ro_baza_rd251.balance + 0.5 * tax_ro_baza_rd252.balance @@ -1452,7 +1452,7 @@ balance aggregation - tax_ro_baza_rd261.balance + 0.5.balance * tax_ro_baza_rd262.balance + tax_ro_baza_rd261.balance + 0.5 * tax_ro_baza_rd262.balance diff --git a/addons/l10n_th/data/account_tax_report_data.xml b/addons/l10n_th/data/account_tax_report_data.xml index 246329301eb..9e5e7b16518 100644 --- a/addons/l10n_th/data/account_tax_report_data.xml +++ b/addons/l10n_th/data/account_tax_report_data.xml @@ -102,11 +102,25 @@ 8. Tax payable (5. minus 7. (if 5. is greater than 7.)) - OUTPUTTAX_TAX.balance - INPUTTAX_TAX if (OUTPUTTAX_TAX > INPUTTAX_TAX) else 0.balance + + + balance + aggregation + OUTPUTTAX_TAX.balance - INPUTTAX_TAX.balance + if_above(THB(0)) + + 9. Excess tax payable (7. minus 5. (if 5. is less than 7.)) - INPUTTAX_TAX.balance - OUTPUTTAX_TAX if (INPUTTAX_TAX > OUTPUTTAX_TAX) else 0.balance + + + balance + aggregation + INPUTTAX_TAX.balance - OUTPUTTAX_TAX.balance + if_above(THB(0)) + + 10. Excess tax payment carried forward from last period