Delete files in render PDF
This commit is contained in:
parent
7a709f056c
commit
27a29d331c
|
@ -1666,12 +1666,19 @@ def to_pdf_from_json(rfc, version, data):
|
|||
if exists(path_logo):
|
||||
data['emisor']['logo2'] = path_logo
|
||||
|
||||
path_cbb = data['timbre']['path_cbb']
|
||||
path = get_path_temp()
|
||||
|
||||
pdf = TemplateInvoice(path)
|
||||
pdf.custom_styles = custom_styles
|
||||
pdf.data = data
|
||||
pdf.render()
|
||||
return read_file(path)
|
||||
|
||||
data = read_file(path)
|
||||
_kill(path)
|
||||
_kill(path_cbb)
|
||||
|
||||
return data
|
||||
|
||||
|
||||
def format_currency(value, currency, digits=2):
|
||||
|
|
|
@ -9913,6 +9913,7 @@ def _exportar_documentos():
|
|||
Facturas.get_pdf(row['id'], rfc, True)
|
||||
msg = '\tPDF generado...'
|
||||
log.info(msg)
|
||||
|
||||
log.info('Documentos exportados...')
|
||||
return
|
||||
|
||||
|
|
Loading…
Reference in New Issue