From 974e49e663f273a5966e57b196690adc2c984039 Mon Sep 17 00:00:00 2001 From: Diego Paradeda Date: Fri, 13 Dec 2024 16:40:30 -0300 Subject: [PATCH] [FIX] l10n_br_nfe: NFCE contingencia processador --- l10n_br_account_nfe/models/document.py | 4 +++- l10n_br_nfe/models/document.py | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/l10n_br_account_nfe/models/document.py b/l10n_br_account_nfe/models/document.py index 9f934c55fb10..65d01b40417f 100644 --- a/l10n_br_account_nfe/models/document.py +++ b/l10n_br_account_nfe/models/document.py @@ -162,7 +162,9 @@ def _update_nfce_for_offline_contingency(self): res = super()._update_nfce_for_offline_contingency() if self.move_ids: copy_invoice = self.move_ids[0].copy() + copy_invoice.fiscal_document_id.processador_edoc = self.processador_edoc - copy_invoice.fiscal_document_id.nfe_transmission = self.nfe_transmission + copy_invoice.processador_edoc = self.processador_edoc + copy_invoice.action_post() return res diff --git a/l10n_br_nfe/models/document.py b/l10n_br_nfe/models/document.py index c58f730d931d..72c37e1c42c8 100644 --- a/l10n_br_nfe/models/document.py +++ b/l10n_br_nfe/models/document.py @@ -896,10 +896,15 @@ def _serialize(self, edocs): for record in self.with_context(lang="pt_BR").filtered( filter_processador_edoc_nfe ): + processor = record.processador_edoc + record.flush() record.invalidate_cache() inf_nfe = record._build_binding("nfe", "40") + record.move_ids.processador_edoc = processor + record.processador_edoc = processor + inf_nfe_supl = None if record.nfe40_infNFeSupl: inf_nfe_supl = record.nfe40_infNFeSupl._build_binding("nfe", "40")