Skip to content

Commit

Permalink
[FIX] l10n_br_nfe: unlink nfesupl before reassigning
Browse files Browse the repository at this point in the history
  • Loading branch information
DiegoParadeda committed Dec 10, 2024
1 parent dd15f8f commit 1cdcb81
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions l10n_br_nfe/models/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -1234,6 +1234,8 @@ def _document_qrcode(self):
super()._document_qrcode()

for record in self.filtered(lambda d: d.document_type == MODELO_FISCAL_NFCE):
if record.nfe40_infNFeSupl:
record.nfe40_infNFeSupl.unlink()
record.nfe40_infNFeSupl = self.env[
"l10n_br_fiscal.document.supplement"
].create(
Expand Down

0 comments on commit 1cdcb81

Please sign in to comment.