Fix - Al generar PDF de carta porte sin remolque

This commit is contained in:
El Mau 2022-01-27 18:34:55 -06:00
parent c83e6981ae
commit fe3f743e32
4 changed files with 10 additions and 6 deletions

View File

@ -1,6 +1,7 @@
v 1.45.5 [27-Ene-2022]
v 1.46.0 [27-Ene-2022]
----------------------
- Mejora: Issue #45
- Mejora: Agregar tipos de persimos SCT para Carta Porte
v 1.45.4 [25-Ene-2022]

View File

@ -1,2 +1,2 @@
1.45.5
1.46.0

View File

@ -379,9 +379,12 @@ class CfdiToDict(object):
values['autotransporte'].update(values_auto)
path = '//cartaporte20:Remolques'
node_tmp = node_auto.xpath(path, namespaces=self.NS)[0][0]
values_auto = CaseInsensitiveDict(node_tmp.attrib)
values['autotransporte'].update(values_auto)
try:
node_tmp = node_auto.xpath(path, namespaces=self.NS)[0][0]
values_auto = CaseInsensitiveDict(node_tmp.attrib)
values['autotransporte'].update(values_auto)
except IndexError:
pass
elif 'Ubicaciones' in node.tag:
ubicaciones = []
for n in node:

View File

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