From a8390ff94bb09f2422bd6a64a2c77ee845fd3a57 Mon Sep 17 00:00:00 2001 From: DanielAPereyraB Date: Tue, 12 Dec 2023 14:13:25 -0400 Subject: [PATCH] [REF] l10n_do_ncf_validation: refact code --- l10n_do_ncf_validation/models/account_move.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/l10n_do_ncf_validation/models/account_move.py b/l10n_do_ncf_validation/models/account_move.py index cf0e115..1f091d2 100644 --- a/l10n_do_ncf_validation/models/account_move.py +++ b/l10n_do_ncf_validation/models/account_move.py @@ -94,6 +94,9 @@ def action_post(self): and inv.l10n_latam_use_documents and inv.company_id.ncf_validation_target != "none" ) + + result = super(AccountMove, self).action_post() + for invoice in l10n_do_fiscal_invoice: ncf_validation_target = invoice.company_id.ncf_validation_target if ncf_validation_target != "both": @@ -117,4 +120,4 @@ def action_post(self): ) ) - return super(AccountMove, self).action_post() + return result