forked from elmau/empresa-libre
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):
|
if exists(path_logo):
|
||||||
data['emisor']['logo2'] = path_logo
|
data['emisor']['logo2'] = path_logo
|
||||||
|
|
||||||
|
path_cbb = data['timbre']['path_cbb']
|
||||||
path = get_path_temp()
|
path = get_path_temp()
|
||||||
|
|
||||||
pdf = TemplateInvoice(path)
|
pdf = TemplateInvoice(path)
|
||||||
pdf.custom_styles = custom_styles
|
pdf.custom_styles = custom_styles
|
||||||
pdf.data = data
|
pdf.data = data
|
||||||
pdf.render()
|
pdf.render()
|
||||||
return read_file(path)
|
|
||||||
|
data = read_file(path)
|
||||||
|
_kill(path)
|
||||||
|
_kill(path_cbb)
|
||||||
|
|
||||||
|
return data
|
||||||
|
|
||||||
|
|
||||||
def format_currency(value, currency, digits=2):
|
def format_currency(value, currency, digits=2):
|
||||||
|
|
|
@ -9913,6 +9913,7 @@ def _exportar_documentos():
|
||||||
Facturas.get_pdf(row['id'], rfc, True)
|
Facturas.get_pdf(row['id'], rfc, True)
|
||||||
msg = '\tPDF generado...'
|
msg = '\tPDF generado...'
|
||||||
log.info(msg)
|
log.info(msg)
|
||||||
|
|
||||||
log.info('Documentos exportados...')
|
log.info('Documentos exportados...')
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue