Fix - al crear PDF
This commit is contained in:
commit
6f3d9cc3fa
|
@ -1,3 +1,8 @@
|
|||
v 1.31.2 [28-oct-2019]
|
||||
----------------------
|
||||
- Error: Al generar PDF con tags en las series
|
||||
|
||||
|
||||
v 1.31.1 [28-ago-2019]
|
||||
----------------------
|
||||
- Error: Al agregar nuevo impuesto #369
|
||||
|
|
|
@ -6,6 +6,8 @@ import smtplib
|
|||
import ssl
|
||||
import collections
|
||||
|
||||
from xml.sax.saxutils import escape
|
||||
|
||||
from collections import OrderedDict
|
||||
from email.mime.multipart import MIMEMultipart
|
||||
from email.mime.base import MIMEBase
|
||||
|
@ -582,7 +584,7 @@ class TemplateInvoice(BaseDocTemplate):
|
|||
if 'spaceBefore' in v['estilo']:
|
||||
v['estilo']['spaceBefore'] = v['estilo']['spaceBefore'] * cm
|
||||
ps = ParagraphStyle(**v['estilo'])
|
||||
p = Paragraph(data[k], ps)
|
||||
p = Paragraph(escape(data[k]), ps)
|
||||
ls.append(p)
|
||||
elif k=='formametodopago':
|
||||
ps = ParagraphStyle(**v['estilo'])
|
||||
|
|
|
@ -9987,6 +9987,7 @@ def _exportar_documentos():
|
|||
month = str(n.month)
|
||||
|
||||
without_stamp = []
|
||||
with_error = []
|
||||
|
||||
filters = {
|
||||
'year': year,
|
||||
|
@ -10009,13 +10010,21 @@ def _exportar_documentos():
|
|||
rfc, year, month.zfill(2), name)
|
||||
if util.exists(path):
|
||||
continue
|
||||
Facturas.get_pdf(row['id'], rfc, True)
|
||||
try:
|
||||
Facturas.get_pdf(row['id'], rfc, True)
|
||||
except Exception as e:
|
||||
with_error.append(f"{row['serie']}-{row['folio']}")
|
||||
print(e)
|
||||
msg = '\tPDF generado...'
|
||||
log.info(msg)
|
||||
|
||||
log.info('Documentos exportados...')
|
||||
log.info('Sin sellar...')
|
||||
for i in without_stamp:
|
||||
log.info(i)
|
||||
log.info('Con error...')
|
||||
for i in with_error:
|
||||
log.info(i)
|
||||
return
|
||||
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ except ImportError:
|
|||
|
||||
|
||||
DEBUG = DEBUG
|
||||
VERSION = '1.31.1'
|
||||
VERSION = '1.31.2'
|
||||
EMAIL_SUPPORT = ('soporte@empresalibre.mx',)
|
||||
TITLE_APP = '{} v{}'.format(TITLE_APP, VERSION)
|
||||
|
||||
|
|
Loading…
Reference in New Issue