Fix - Al enviar correo
This commit is contained in:
parent
42d041c715
commit
524db01ac9
|
@ -252,13 +252,18 @@ class SendMail(object):
|
|||
|
||||
def _login(self):
|
||||
try:
|
||||
if self._config['ssl']:
|
||||
if self._config['ssl'] and 'gmail' in self._config['servidor']:
|
||||
self._server = smtplib.SMTP(
|
||||
self._config['servidor'],
|
||||
self._config['puerto'], timeout=10)
|
||||
self._server.ehlo()
|
||||
self._server.starttls()
|
||||
self._server.ehlo()
|
||||
elif self._config['ssl']:
|
||||
self._server = smtplib.SMTP_SSL(
|
||||
self._config['servidor'],
|
||||
self._config['puerto'], timeout=10)
|
||||
self._server.ehlo()
|
||||
else:
|
||||
self._server = smtplib.SMTP(
|
||||
self._config['servidor'],
|
||||
|
|
|
@ -1666,10 +1666,10 @@ class ImportFacturaLibreGambas(object):
|
|||
data = {}
|
||||
tables = (
|
||||
('receptores', 'Socios'),
|
||||
# ~ ('cfdifacturas', 'Facturas'),
|
||||
# ~ ('categorias', 'Categorias'),
|
||||
# ~ ('productos', 'Productos'),
|
||||
# ~ ('tickets', 'Tickets'),
|
||||
('cfdifacturas', 'Facturas'),
|
||||
('categorias', 'Categorias'),
|
||||
('productos', 'Productos'),
|
||||
('tickets', 'Tickets'),
|
||||
)
|
||||
for source, target in tables:
|
||||
data[target] = self._get_table(source)
|
||||
|
@ -1757,6 +1757,7 @@ class ImportFacturaLibreGambas(object):
|
|||
'0': 0.0,
|
||||
'16': 0.16,
|
||||
'16.00': 0.16,
|
||||
'0.16': 0.16,
|
||||
'11': 0.11,
|
||||
'-10': 0.10,
|
||||
'-2': 0.02,
|
||||
|
@ -2007,7 +2008,7 @@ class ImportFacturaLibreGambas(object):
|
|||
|
||||
if not new['uuid']:
|
||||
new['uuid'] = None
|
||||
elif new['uuid'] in('ok', '123'):
|
||||
elif new['uuid'] in('ok', '123', '??'):
|
||||
new['uuid'] = None
|
||||
new['estatus'] = 'Cancelada'
|
||||
new['cancelada'] = True
|
||||
|
|
|
@ -4972,10 +4972,10 @@ def _importar_factura_libre_gambas(conexion):
|
|||
data = app.import_data()
|
||||
|
||||
_importar_socios(data['Socios'])
|
||||
# ~ _importar_facturas(data['Facturas'])
|
||||
# ~ _importar_categorias(data['Categorias'])
|
||||
# ~ _importar_productos_gambas(data['Productos'])
|
||||
# ~ _import_tickets(data['Tickets'])
|
||||
_importar_facturas(data['Facturas'])
|
||||
_importar_categorias(data['Categorias'])
|
||||
_importar_productos_gambas(data['Productos'])
|
||||
_import_tickets(data['Tickets'])
|
||||
|
||||
log.info('Importación terminada...')
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue