Corregir el error al enviar correo

This commit is contained in:
El Mau 2022-01-20 13:22:51 -06:00
parent 4922010caf
commit 88dd9ca04b
6 changed files with 15 additions and 8 deletions

View File

@ -1,3 +1,11 @@
v 1.45.1 [20-Ene-2022]
----------------------
- Error: Al enviar correos con la nueva configuración
- Error: Al cancelar CFDI
* IMPORTANTE: Revisa tu configuración de correo para verificar que todo funcione.
v 1.45.0 [20-Ene-2022]
----------------------
- Importar Carta Porte desde archivo JSON

View File

@ -1,2 +1,2 @@
1.45.0
1.45.1

View File

@ -245,7 +245,7 @@ class PACComercioDigital(object):
return headers
def cancel_xml(self, xml, auth={}, cfdi='', info={'tipo': 'cfdi3.3'}):
def cancel_xml(self, xml, auth={}, cfdi='', info={'tipo': 'cfdi'}):
if DEBUG or not auth:
auth = AUTH

View File

@ -722,14 +722,10 @@ def xml_cancel(xml, auth, cert, name):
def get_client_balance(auth, rfc=''):
if DEBUG:
return '-d'
pac = PACS[auth['pac']]()
balance = pac.client_balance(auth, rfc)
if pac.error:
balance = 'p/e'
return balance

View File

@ -4897,11 +4897,12 @@ class Facturas(BaseModel):
files = (cls.get_pdf(id, rfc), cls.get_xml(id))
fields = util.make_fields(obj.xml)
starttls = bool(int(values.get('correo_starttls', '0')))
server = {
'servidor': values['correo_servidor'],
'puerto': values['correo_puerto'],
'ssl': bool(int(values['correo_ssl'])),
'starttls': bool(int(values['correo_starttls'])),
'starttls': starttls,
'usuario': values['correo_usuario'],
'contra': utils.decrypt(contra, rfc),
}
@ -6335,10 +6336,12 @@ class PreFacturas(BaseModel):
rfc = Emisor.select()[0].rfc
asunto = 'Enviamos la prefactura: PRE-{}'.format(obj.folio)
starttls = bool(int(values.get('correo_starttls', '0')))
server = {
'servidor': values['correo_servidor'],
'puerto': values['correo_puerto'],
'ssl': bool(int(values['correo_ssl'])),
'starttls': starttls,
'usuario': values['correo_usuario'],
'contra': utils.decrypt(contra, rfc),
}

View File

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