diff --git a/controllers/dashboard.py b/controllers/dashboard.py index 32e11bb..df202c7 100644 --- a/controllers/dashboard.py +++ b/controllers/dashboard.py @@ -5,10 +5,8 @@ # mostrando un resumen de la tarea junto con accesos al expediente __author__ = "María Andrea Vignau (mavignau@gmail.com)" __copyright__ = "(C) 2016 María Andrea Vignau. GNU GPL 3." - import datetime - @auth.requires_login() def view(): expte_grid = SQLFORM.grid( @@ -28,14 +26,14 @@ def view(): exportclasses=myexport) query_agenda = (db.agenda.created_by == auth.user.id) query_agenda &= (db.agenda.estado == 'P') - ahora = datetime.datetime.now() + ahora = request.now query_semana = query_agenda & (db.agenda.vencimiento > ahora) + query_vencidos = query_agenda & ( + db.agenda.vencimiento < ahora) ahora += datetime.timedelta(7) if not request.is_local: update_task_week(ahora) # Para mantener visible la agenda en tareas urgentes en la version de testeo online query_semana &= (db.agenda.vencimiento < ahora) - query_vencidos = query_agenda & ( - db.agenda.vencimiento < datetime.datetime.now()) semanal_grid = SQLFORM.grid( query_semana, diff --git a/controllers/expedientes.py b/controllers/expedientes.py index 9681d0f..ad7ad36 100644 --- a/controllers/expedientes.py +++ b/controllers/expedientes.py @@ -7,7 +7,7 @@ import tempfile from collections import OrderedDict from xhtml2pdf import pisa -LINKED_TABLES = ['movimiento', 'agenda', 'parte'] +LINKED_TABLES = ['movimiento', 'parte'] ZIP_FILENAME = 'Movimiento.zip' CHUNK_SIZE = 4096 @@ -125,6 +125,7 @@ def convert_html_to_pdf(source_html, output_filename): def vista_expediente(): 'muestra un panel a la izquierda que tiene los datos del expediente y permite navegar en él' + LINKED_TABLES.append("agenda") expte = SQLFORM(db.expediente, int(request.args[0]), formstyle='bootstrap', diff --git a/views/expedientes/index.html b/views/expedientes/index.html index 2d43ced..cbd3312 100644 --- a/views/expedientes/index.html +++ b/views/expedientes/index.html @@ -25,10 +25,3 @@