This commit is contained in:
Mauricio Baeza 2020-12-16 16:04:32 -06:00
parent 3a51a50c8e
commit bd7508fe6b
8 changed files with 34 additions and 10 deletions

View File

@ -1,3 +1,9 @@
v 1.40.0 [20-12-2020]
----------------------
- Error: Al parsear XML en Python 3.9+
- Mejora: Agregar versión de Empresa Libre a plantilla.
v 1.39.1 [17-sep-2020]
----------------------
- Error: Esquema para complemento IEDU

View File

@ -10,16 +10,17 @@ Este proyecto está en continuo desarrollo, contratar un esquema de soporte,
nos ayuda a continuar su desarrollo. Ponte en contacto con nosotros para
contratar: administracion ARROBA empresalibre.net
#### Ahora también puede aportar con Bitcoin Cash (BCH):
#### Ahora también puede aportar con criptomonedas:
`pq763fj7kxxf2wtf360lfsy5ydw84yz72q76hanhxq`
BCH: `qztd3l00xle5tffdqvh2snvadkuau2ml0uqm4n875d`
BTC: `3FhiXcXmAesmQzrNEngjHFnvaJRhU1AGWV`
### Requerimientos:
* Servidor web, recomendado Nginx
* uwsgi
* python3.6+
* python3.7+
* xsltproc
* openssl
* xmlsec

View File

@ -1 +1 @@
1.39.1
1.40.0

View File

@ -13,3 +13,9 @@ pypng
reportlab
psycopg2-binary
cryptography
# escpos
# pyusb
# pyserial
# qrcode

View File

@ -1339,9 +1339,15 @@ class LIBO(object):
self._leyendas(data.get('leyendas', ''))
self._cancelado(data['cancelada'])
self._others_values(data)
self._clean()
return
def _others_values(self, data):
version = data['version']
self._set_cell('{version}', version)
return
def pdf(self, path, data, ods=False):
options = {'AsTemplate': True, 'Hidden': True}
log.debug('Abrir plantilla...')
@ -1818,7 +1824,7 @@ def _get_relacionados(doc, version):
if node is None:
return ''
uuids = ['UUID: {}'.format(n.attrib['UUID']) for n in node.getchildren()]
uuids = ['UUID: {}'.format(n.attrib['UUID']) for n in list(node)]
return '\n'.join(uuids)
@ -1933,7 +1939,8 @@ def _conceptos(doc, version, options):
data = []
conceptos = doc.find('{}Conceptos'.format(PRE[version]))
for c in conceptos.getchildren():
# ~ for c in conceptos.getchildren():
for c in list(conceptos):
values = CaseInsensitiveDict(c.attrib.copy())
if is_nomina:
values['noidentificacion'] = values['ClaveProdServ']
@ -2002,7 +2009,8 @@ def _totales(doc, cfdi, version):
node = imp.find('{}Traslados'.format(PRE[version]))
if node is not None:
for n in node.getchildren():
# ~ for n in node.getchildren():
for n in list(node):
tmp = CaseInsensitiveDict(n.attrib.copy())
if version == '3.3':
tasa = round(float(tmp['tasaocuota']), DECIMALES)
@ -2013,7 +2021,8 @@ def _totales(doc, cfdi, version):
node = imp.find('{}Retenciones'.format(PRE[version]))
if node is not None:
for n in node.getchildren():
# ~ for n in node.getchildren():
for n in list(node):
tmp = CaseInsensitiveDict(n.attrib.copy())
if version == '3.3':
title = 'Retención {} {}'.format(
@ -2196,6 +2205,7 @@ def get_data_from_xml(invoice, values):
if data['pagos']:
data['pays'] = _cfdipays(doc, data, version)
data['pakings'] = values.get('pakings', [])
data['version'] = values['version']
return data

View File

@ -49,6 +49,7 @@ from settings import (
PATHS,
URL,
VALUES_PDF,
VERSION,
RFCS,
)
@ -3965,7 +3966,7 @@ class Facturas(BaseModel):
def _get_not_in_xml(self, invoice, emisor):
pdf_from = Configuracion.get_('make_pdf_from') or '1'
values = {}
values = {'version': VERSION}
values['notas'] = invoice.notas
values['fechadof'] = str(emisor.fecha_dof)

View File

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