Browse Source

Excluída rotina para filtro inicial das ocorrências, que ficará no link do treemenus

stable/1.0
Sesostris Vieira 12 years ago
parent
commit
4a71d3fe4b
  1. 9
      sigi/apps/ocorrencias/admin.py

9
sigi/apps/ocorrencias/admin.py

@ -80,15 +80,6 @@ class OcorrenciaAdmin(admin.ModelAdmin):
self.fields = ('casa_legislativa', 'categoria', 'assunto', 'prioridade', 'descricao', 'resolucao', ) self.fields = ('casa_legislativa', 'categoria', 'assunto', 'prioridade', 'descricao', 'resolucao', )
return super(OcorrenciaAdmin, self).get_fieldsets(request, obj) return super(OcorrenciaAdmin, self).get_fieldsets(request, obj)
def changelist_view(self, request, *args, **kwargs):
try:
if len(request.GET) == 0:
url = reverse('admin:%s_%s_changelist' % (self.opts.app_label, self.opts.module_name))
return HttpResponseRedirect("%s?grupo=S&status__in=1,2" % url)
except:
pass
return super(OcorrenciaAdmin, self).changelist_view(request, *args, **kwargs)
def save_model(self, request, obj, form, change): def save_model(self, request, obj, form, change):
if not change: if not change:
obj.servidor_registro = Servidor.objects.get(user=request.user) obj.servidor_registro = Servidor.objects.get(user=request.user)

Loading…
Cancel
Save