forked from elmau/empresa-libre
Fix error in nomina
This commit is contained in:
parent
89f79de9b6
commit
5aece843bf
|
@ -151,7 +151,8 @@ class CFDI(object):
|
||||||
return ''
|
return ''
|
||||||
|
|
||||||
self._comprobante(datos['comprobante'])
|
self._comprobante(datos['comprobante'])
|
||||||
self._informacion_global(datos['global'])
|
if 'global' in datos:
|
||||||
|
self._informacion_global(datos['global'])
|
||||||
self._relacionados(datos['relacionados'])
|
self._relacionados(datos['relacionados'])
|
||||||
self._emisor(datos['emisor'])
|
self._emisor(datos['emisor'])
|
||||||
self._receptor(datos['receptor'])
|
self._receptor(datos['receptor'])
|
||||||
|
|
|
@ -542,13 +542,14 @@ class AppDocumentos(object):
|
||||||
self._db = db
|
self._db = db
|
||||||
|
|
||||||
def on_get(self, req, resp, type_doc, id_doc):
|
def on_get(self, req, resp, type_doc, id_doc):
|
||||||
|
# ~ print('TD', type_doc)
|
||||||
session = req.env['beaker.session']
|
session = req.env['beaker.session']
|
||||||
req.context['result'], file_name, content_type = \
|
req.context['result'], file_name, content_type = \
|
||||||
self._db.get_doc(type_doc, id_doc, session['rfc'])
|
self._db.get_doc(type_doc, id_doc, session['rfc'])
|
||||||
if not type_doc in ('pdf', 'pre', 'tpdf', 'pdfpago', 'html'):
|
if not type_doc in ('pdf', 'pre', 'tpdf', 'pdfpago', 'html', 'nompdf'):
|
||||||
resp.append_header('Content-Disposition',
|
resp.append_header('Content-Disposition',
|
||||||
'attachment; filename={}'.format(file_name))
|
'attachment; filename={}'.format(file_name))
|
||||||
if type_doc in ('pdf',):
|
if type_doc in ('pdf', 'nompdf'):
|
||||||
resp.append_header('Content-Disposition',
|
resp.append_header('Content-Disposition',
|
||||||
'inline; filename={}'.format(file_name))
|
'inline; filename={}'.format(file_name))
|
||||||
resp.content_type = content_type
|
resp.content_type = content_type
|
||||||
|
|
|
@ -157,6 +157,7 @@ PRE = {
|
||||||
'LOCALES': '{http://www.sat.gob.mx/implocal}',
|
'LOCALES': '{http://www.sat.gob.mx/implocal}',
|
||||||
'NOMINA': {
|
'NOMINA': {
|
||||||
'1.1': '{http://www.sat.gob.mx/nomina}',
|
'1.1': '{http://www.sat.gob.mx/nomina}',
|
||||||
|
'1.2': '{http://www.sat.gob.mx/nomina12}',
|
||||||
},
|
},
|
||||||
'PAGOS': {
|
'PAGOS': {
|
||||||
'1.0': '{http://www.sat.gob.mx/Pagos}',
|
'1.0': '{http://www.sat.gob.mx/Pagos}',
|
||||||
|
|
Loading…
Reference in New Issue