Fix - Al mostrar el título

This commit is contained in:
Mauricio Baeza 2018-06-25 22:56:02 -05:00
parent dc1f48cc0b
commit a8405a98fb
8 changed files with 25 additions and 9 deletions

View File

@ -1,3 +1,9 @@
v 1.9.1 [25-jun-2018]
---------------------
- Fix: Al mostrar el título de la aplicación
- Se agrega el registro de acción al borrar una factura
v 1.9.0 [18-jun-2018]
---------------------
- Se agrega la vista del detalle de facturas

View File

@ -1 +1 @@
1.9.0
1.9.1

View File

@ -8,6 +8,7 @@ MV = True
# ~ una nueva base de datos, personaliza por la que quieras.
DEFAULT_PASSWORD = 'salgueiro3.3'
TITLE_APP = 'Empresa Libre'
#~ Establece una ruta accesible para el servidor web
LOG_PATH = '/home/empresa/.opt/empresa-libre.log'

View File

@ -110,8 +110,7 @@ class AppValues(object):
def on_get(self, req, resp, table):
values = req.params
session = req.env['beaker.session']
if req.path in ('values/titlelogin', '/values/empresas'):
if req.path in ('/values/titlelogin', '/values/empresas'):
req.context['result'] = self._db.get_values(table, values, session)
resp.status = falcon.HTTP_200
return
@ -313,7 +312,8 @@ class AppInvoices(object):
def on_delete(self, req, resp):
values = req.params
if self._db.delete('invoice', values['id']):
session = req.env['beaker.session']
if self._db.delete('invoice', values['id'], session['userobj']):
resp.status = falcon.HTTP_200
else:
resp.status = falcon.HTTP_204

View File

@ -19,6 +19,8 @@ from zeep.plugins import HistoryPlugin
from zeep.cache import SqliteCache
from zeep.transports import Transport
from zeep.exceptions import Fault, TransportError
from requests.exceptions import ConnectionError
if __name__ == '__main__':
from configpac import DEBUG, TIMEOUT, AUTH, URL
@ -268,6 +270,10 @@ class Finkok(object):
else:
self.error = str(e)
return
except ConnectionError as e:
msg = '502 - Error de conexión'
self.error = msg
return
return self._check_result(method, result)

View File

@ -256,13 +256,13 @@ class StorageEngine(object):
def _get_ebancomov(self, values):
return main.MovimientosBanco.con(values['id'])
def delete(self, table, id):
def delete(self, table, id, user=None):
if table == 'partner':
return main.Socios.remove(id)
if table == 'product':
return main.Productos.remove(id)
if table == 'invoice':
return main.Facturas.remove(id)
return main.Facturas.remove(id, user)
if table == 'folios':
return main.Folios.remove(id)
if table == 'preinvoice':

View File

@ -3666,7 +3666,7 @@ class Facturas(BaseModel):
return {'ok': True, 'rows': rows}
@classmethod
def remove(cls, id):
def remove(cls, id, user):
obj = Facturas.get(Facturas.id==id)
if obj.uuid:
return False
@ -3678,6 +3678,10 @@ class Facturas(BaseModel):
q = FacturasRelacionadas.delete().where(FacturasRelacionadas.factura==obj)
q.execute()
Tickets.uncancel(obj)
m = 'B {}'.format(obj.id)
_save_log(user.usuario, m, 'F')
return bool(obj.delete_instance())
def _get_folio(self, serie):

View File

@ -31,7 +31,7 @@ except ImportError:
DEBUG = DEBUG
VERSION = '1.9.0'
VERSION = '1.9.1'
EMAIL_SUPPORT = ('soporte@empresalibre.net',)
TITLE_APP = '{} v{}'.format(TITLE_APP, VERSION)
@ -62,7 +62,6 @@ template_lookup = TemplateLookup(directories=[PATH_TEMPLATES],
input_encoding='utf-8',
output_encoding='utf-8')
LOG_PATH = 'empresalibre.log'
LOG_NAME = 'API'
LOG_LEVEL = 'INFO'