Skip to content

Commit

Permalink
Merge pull request #1276 from Trust-Code/14.0-fix_export_nfe
Browse files Browse the repository at this point in the history
remove caracteres indesejados no nome do pdf da nfe
  • Loading branch information
danimaribeiro authored Oct 6, 2023
2 parents 003d8be + c077fb2 commit eb91980
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion l10n_br_eletronic_document/wizard/export_nfe.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ def nfse_export(self):
report_service = danfe_report.xml_id
danfe, dummy = self.env.ref(report_service)._render_qweb_pdf([invoice.id])
report_name = safe_eval(danfe_report.print_report_name, {'object': invoice})
filename = "%s.%s" % (report_name, "pdf")
report_name_clean = "".join([c for c in report_name if c.isalpha() or c.isdigit() or c == ' ']).rstrip()
filename = "%s.%s" % (report_name_clean, "pdf")
pdfs.append({
'content': danfe,
'name': filename
Expand Down

0 comments on commit eb91980

Please sign in to comment.