From f3d942a6e4b11464e5adc446a731cb9ea8da797f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Arturo=20Garci=CC=81a?= Date: Mon, 10 Aug 2026 22:21:31 -0400 Subject: [PATCH] Structure Dominican financial statements --- CHANGELOG | 5 ++++ account_chart_do_en.xml | 55 +++++++++++++++++++++++++++---------- account_chart_do_es_419.xml | 55 +++++++++++++++++++++++++++---------- tests/test_module.py | 30 ++++++++++++++++++-- tryton.cfg | 2 +- 5 files changed, 113 insertions(+), 34 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 67dc2b8..471bf14 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,8 @@ +Version 8.0.2 - 2026-08-10 +-------------------------- +* Structure income-statement types under current-period profit or loss, with + operating and non-operating sections compatible with Tryton core reports. + Version 8.0.1 - 2026-08-09 -------------------------- * Initial release. diff --git a/account_chart_do_en.xml b/account_chart_do_en.xml index 6ab84e5..8fdda90 100644 --- a/account_chart_do_en.xml +++ b/account_chart_do_en.xml @@ -191,45 +191,70 @@ balance + + Current Period Profit or Loss + + + income + + + Operating profit or loss + + + income + Revenue - - + + income - - Other Income and Gains - - + + Operating costs and expenses + + income - + Cost of Sales and Services - - + + income Operational expenses - - + + income + + Non-operating profit or loss + + + income + + + Other Income and Gains + + + income + + Financial expenses - - + + income Income Tax - - + + income diff --git a/account_chart_do_es_419.xml b/account_chart_do_es_419.xml index 11eda86..46eb3cf 100644 --- a/account_chart_do_es_419.xml +++ b/account_chart_do_es_419.xml @@ -189,45 +189,70 @@ balance + + Resultado del período actual + + + income + + + Resultado de operación + + + income + Ingresos de actividades ordinarias - - + + income - - Otros ingresos y ganancias - - + + Costos y gastos de operación + + income - + Costo de ventas y servicios - - + + income Gastos operacionales - - + + income + + Resultado no operativo + + + income + + + Otros ingresos y ganancias + + + income + + Gastos financieros - - + + income Impuesto a las ganancias - - + + income diff --git a/tests/test_module.py b/tests/test_module.py index 3754e3c..6f4430c 100644 --- a/tests/test_module.py +++ b/tests/test_module.py @@ -565,7 +565,7 @@ class AccountDoUnitTestCase(unittest.TestCase): if line.strip() ] - self.assertEqual(config.get('tryton', 'version'), '8.0.1') + self.assertEqual(config.get('tryton', 'version'), '8.0.2') self.assertEqual( set(lines('tryton', 'depends')), {'account', 'ir'}) @@ -646,7 +646,7 @@ class AccountDoUnitTestCase(unittest.TestCase): def test_xml_record_inventory_is_explicit(self): expected = { 'account_chart_do_en.xml': { - 'account.account.type.template': 36, + 'account.account.type.template': 40, 'account.account.template': 287, }, 'tax_do_en.xml': { @@ -662,7 +662,7 @@ class AccountDoUnitTestCase(unittest.TestCase): 'account.tax.rule.line.template': 34, }, 'account_chart_do_es_419.xml': { - 'account.account.type.template': 36, + 'account.account.type.template': 40, 'account.account.template': 287, }, 'tax_do_es_419.xml': { @@ -879,6 +879,30 @@ class AccountDoUnitTestCase(unittest.TestCase): types['do_type_retained_earnings']['statement'], 'balance') self.assertEqual(types['do_type_revenue']['statement'], 'income') self.assertEqual(types['do_type_expense']['statement'], 'income') + self.assertEqual( + types['do_type_profit_loss']['parent'], 'do_type_equity') + self.assertEqual( + types['do_type_operating_section']['parent'], + 'do_type_profit_loss') + self.assertEqual( + types['do_type_revenue']['parent'], + 'do_type_operating_section') + self.assertEqual( + types['do_type_expenses']['parent'], + 'do_type_operating_section') + self.assertEqual( + types['do_type_cogs']['parent'], 'do_type_expenses') + self.assertEqual( + types['do_type_expense']['parent'], 'do_type_expenses') + self.assertEqual( + types['do_type_non_operating_section']['parent'], + 'do_type_profit_loss') + for account_type in [ + 'do_type_other_income', 'do_type_financial_expense', + 'do_type_income_tax']: + self.assertEqual( + types[account_type]['parent'], + 'do_type_non_operating_section') self.assertEqual( accounts['do_account_110201']['type'], 'do_type_receivable') self.assertEqual( diff --git a/tryton.cfg b/tryton.cfg index cff546a..afba38f 100644 --- a/tryton.cfg +++ b/tryton.cfg @@ -1,5 +1,5 @@ [tryton] -version=8.0.1 +version=8.0.2 depends: account ir