From e72c9388ae450b9bdea0e272dc295f84d1e7f4c5 Mon Sep 17 00:00:00 2001 From: Gleidy Espinal <1104225@est.intec.edu.do> Date: Mon, 24 Jun 2024 12:32:11 -0400 Subject: [PATCH] [ADD]l10n_do_accounting: adding else to _create_l10n_do_invoice to add specific taxes --- l10n_do_accounting/tests/common.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/l10n_do_accounting/tests/common.py b/l10n_do_accounting/tests/common.py index a266e1657..92962d87b 100644 --- a/l10n_do_accounting/tests/common.py +++ b/l10n_do_accounting/tests/common.py @@ -155,5 +155,11 @@ def _create_l10n_do_invoice(self, data=None, invoice_type="out_invoice"): ) for tax in taxes: invoice_line_form.tax_ids.add(tax) + else: + invoice_line_form.tax_ids.clear() + for tax in line.get("taxes", []): + tax_id = self.env['account.tax'].browse(tax[1]) + invoice_line_form.tax_ids.add(tax_id) + invoice = invoice_form.save() return invoice