Skip to content

Commit

Permalink
[FIX] l10n_br_nfe: NFCE contingencia processador
Browse files Browse the repository at this point in the history
  • Loading branch information
DiegoParadeda committed Dec 13, 2024
1 parent d012fd0 commit 974e49e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 3 additions & 1 deletion l10n_br_account_nfe/models/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 5 additions & 0 deletions l10n_br_nfe/models/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 974e49e

Please sign in to comment.