Skip to content

Commit

Permalink
[FIX] engenere_danfe_boleto: check state of move vinculated
Browse files Browse the repository at this point in the history
  • Loading branch information
felipemotter committed Jan 30, 2025
1 parent 671b2fa commit 2e0c54b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion engenere_danfe_boleto/models/l10n_br_fiscal_document.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def view_boleto_pdf(self):
return self.move_ids._target_new_tab(self.move_ids.file_boleto_pdf_id)

def generate_combined_pdf(self):
if self.state != "posted":
if self.move_ids and self.move_ids.state != "posted":
raise UserError(
_("PDF can only be generated if the document status is posted.")
)
Expand Down

0 comments on commit 2e0c54b

Please sign in to comment.