Fix - al generar PDF

This commit is contained in:
Mauricio Baeza 2019-10-28 19:35:03 -06:00
parent af6b13fa67
commit cff2294601
5 changed files with 20 additions and 4 deletions

View File

@ -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] v 1.31.1 [28-ago-2019]
---------------------- ----------------------
- Error: Al agregar nuevo impuesto #369 - Error: Al agregar nuevo impuesto #369

View File

@ -1 +1 @@
1.31.1 1.31.2

View File

@ -6,6 +6,8 @@ import smtplib
import ssl import ssl
import collections import collections
from xml.sax.saxutils import escape
from collections import OrderedDict from collections import OrderedDict
from email.mime.multipart import MIMEMultipart from email.mime.multipart import MIMEMultipart
from email.mime.base import MIMEBase from email.mime.base import MIMEBase
@ -582,7 +584,7 @@ class TemplateInvoice(BaseDocTemplate):
if 'spaceBefore' in v['estilo']: if 'spaceBefore' in v['estilo']:
v['estilo']['spaceBefore'] = v['estilo']['spaceBefore'] * cm v['estilo']['spaceBefore'] = v['estilo']['spaceBefore'] * cm
ps = ParagraphStyle(**v['estilo']) ps = ParagraphStyle(**v['estilo'])
p = Paragraph(data[k], ps) p = Paragraph(escape(data[k]), ps)
ls.append(p) ls.append(p)
elif k=='formametodopago': elif k=='formametodopago':
ps = ParagraphStyle(**v['estilo']) ps = ParagraphStyle(**v['estilo'])

View File

@ -9987,6 +9987,7 @@ def _exportar_documentos():
month = str(n.month) month = str(n.month)
without_stamp = [] without_stamp = []
with_error = []
filters = { filters = {
'year': year, 'year': year,
@ -10009,13 +10010,21 @@ def _exportar_documentos():
rfc, year, month.zfill(2), name) rfc, year, month.zfill(2), name)
if util.exists(path): if util.exists(path):
continue 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...' msg = '\tPDF generado...'
log.info(msg) log.info(msg)
log.info('Documentos exportados...') log.info('Documentos exportados...')
log.info('Sin sellar...')
for i in without_stamp: for i in without_stamp:
log.info(i) log.info(i)
log.info('Con error...')
for i in with_error:
log.info(i)
return return

View File

@ -47,7 +47,7 @@ except ImportError:
DEBUG = DEBUG DEBUG = DEBUG
VERSION = '1.31.1' VERSION = '1.31.2'
EMAIL_SUPPORT = ('soporte@empresalibre.mx',) EMAIL_SUPPORT = ('soporte@empresalibre.mx',)
TITLE_APP = '{} v{}'.format(TITLE_APP, VERSION) TITLE_APP = '{} v{}'.format(TITLE_APP, VERSION)