From cdd5a48a36cebec81b963ddfadebc910862b3107 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Arturo=20Garci=CC=81a?= Date: Wed, 22 Jul 2026 22:33:52 -0400 Subject: [PATCH] Align invoice line tax field names --- invoice.py | 17 ++--------------- locale/es_419.po | 4 ---- tests/test_invoice_helpers.py | 3 --- tests/test_module.py | 1 - view/invoice_line_form.xml | 4 ++-- view/invoice_line_tree_sequence.xml | 2 +- 6 files changed, 5 insertions(+), 26 deletions(-) diff --git a/invoice.py b/invoice.py index e3629ba..1e5e78b 100755 --- a/invoice.py +++ b/invoice.py @@ -126,13 +126,8 @@ class InvoiceLine(metaclass=PoolMeta): 'on_change_with_product_type' ) - itbis_invoiced_line = fields.Function(Monetary( - "ITBIS Invoiced", currency='currency', digits='currency', - states=_LINE_STATES), - 'get_itbis_invoiced_line' - ) itbis_line = fields.Function(Monetary( - "ITBIS", currency='currency', digits='currency', + "ITBIS Invoiced", currency='currency', digits='currency', states=_LINE_STATES), 'get_itbis_line' ) @@ -243,13 +238,9 @@ class InvoiceLine(metaclass=PoolMeta): return cls._round_amount(line, subtotal) return Decimal('0.0') - @classmethod - def get_itbis_invoiced_line(cls, lines, name): - return {l.id: cls._compute_tax_kind_amount(l, 'itbis') for l in lines} - @classmethod def get_itbis_line(cls, lines, name): - return cls.get_itbis_invoiced_line(lines, name) + return {l.id: cls._compute_tax_kind_amount(l, 'itbis') for l in lines} @classmethod def get_itbis_withholding_line(cls, lines, name): @@ -275,10 +266,6 @@ class InvoiceLine(metaclass=PoolMeta): def get_line_total(cls, lines, name): return {l.id: cls._compute_line_total_amount(l) for l in lines} - @fields.depends(*_LINE_DEPENDS, methods=['on_change_with_amount']) - def on_change_with_itbis_invoiced_line(self, name=None): - return InvoiceLine._compute_tax_kind_amount(self, 'itbis') - @fields.depends(*_LINE_DEPENDS, methods=['on_change_with_amount']) def on_change_with_itbis_line(self, name=None): return InvoiceLine._compute_tax_kind_amount(self, 'itbis') diff --git a/locale/es_419.po b/locale/es_419.po index 465b950..c60b726 100755 --- a/locale/es_419.po +++ b/locale/es_419.po @@ -93,10 +93,6 @@ msgid "Process Posted Supplier Invoices" msgstr "Procesar Facturas de Proveedores Contabilizadas" msgctxt "field:account.invoice.line,itbis_line:" -msgid "ITBIS" -msgstr "ITBIS Facturado" - -msgctxt "field:account.invoice.line,itbis_invoiced_line:" msgid "ITBIS Invoiced" msgstr "ITBIS Facturado" diff --git a/tests/test_invoice_helpers.py b/tests/test_invoice_helpers.py index e7ff6c8..33ea434 100644 --- a/tests/test_invoice_helpers.py +++ b/tests/test_invoice_helpers.py @@ -52,9 +52,6 @@ class AccountInvoiceDoUnitTestCase(unittest.TestCase): self.assertEqual( InvoiceLine._compute_tax_kind_amount(line, 'itbis'), Decimal('18.00')) - self.assertEqual( - InvoiceLine.on_change_with_itbis_invoiced_line(line), - Decimal('18.00')) self.assertEqual( InvoiceLine.on_change_with_itbis_line(line), Decimal('18.00')) diff --git a/tests/test_module.py b/tests/test_module.py index 20cccd9..9d5cf9e 100644 --- a/tests/test_module.py +++ b/tests/test_module.py @@ -98,7 +98,6 @@ class AccountInvoiceDoTestCase(ModuleTestCase): self.assertEqual(invoice.total_amount, Decimal('300.00')) line, = invoice.lines self.assertEqual(line.product_type, '') - self.assertEqual(line.itbis_invoiced_line, Decimal('0.00')) self.assertEqual(line.itbis_line, Decimal('0.00')) self.assertEqual(line.line_total, Decimal('300.00')) diff --git a/view/invoice_line_form.xml b/view/invoice_line_form.xml index a71daf5..b325b89 100644 --- a/view/invoice_line_form.xml +++ b/view/invoice_line_form.xml @@ -5,8 +5,8 @@ this repository contains the full copyright notices and license terms. --> - - +