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