From 064d40e655bb22b55d2d6323d362ed46545dfa90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ses=C3=B3stris=20Vieira?= Date: Wed, 1 Feb 2023 16:16:15 -0300 Subject: [PATCH] =?UTF-8?q?Adiciona=20status=20pendente=20no=20filtro=20de?= =?UTF-8?q?=20conv=C3=AAnios?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sigi/apps/convenios/admin.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sigi/apps/convenios/admin.py b/sigi/apps/convenios/admin.py index 59852d8..07d8fe8 100644 --- a/sigi/apps/convenios/admin.py +++ b/sigi/apps/convenios/admin.py @@ -85,6 +85,7 @@ class ConvenioVigenteFilter(admin.filters.SimpleListFilter): return ( ("vigentes", _("Vigentes")), ("vencidos", _("Vencidos")), + ("pendentes", _("Pendentes")), ) def queryset(self, request, queryset): @@ -97,6 +98,13 @@ class ConvenioVigenteFilter(admin.filters.SimpleListFilter): return queryset.exclude(data_termino_vigencia=None).filter( data_termino_vigencia__lt=timezone.localdate() ) + elif self.value() == "pendentes": + return queryset.filter( + data_retorno_assinatura=None, + data_devolucao_sem_assinatura=None, + data_retorno_sem_assinatura=None, + ) + return queryset @admin.register(Projeto)