Browse Source

finalizando o tkt #77

pull/78/head
Lude Ribeiro 3 years ago
parent
commit
8e761bfd3b
  1. 20
      sigi/apps/convenios/migrations/0010_auto_20210819_0833.py
  2. 14
      sigi/apps/ocorrencias/admin.py

20
sigi/apps/convenios/migrations/0010_auto_20210819_0833.py

@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('convenios', '0009_auto_20210611_0946'),
]
operations = [
migrations.AlterField(
model_name='convenio',
name='data_retorno_assinatura',
field=models.DateField(help_text='Conv\xeanio firmado.', null=True, verbose_name='data in\xedcio vig\xeancia', blank=True),
preserve_default=True,
),
]

14
sigi/apps/ocorrencias/admin.py

@ -85,13 +85,13 @@ class OcorrenciaAdmin(BaseModelAdmin):
def get_changelist(self, request, **kwargs): def get_changelist(self, request, **kwargs):
return OcorrenciaChangeList return OcorrenciaChangeList
def get_readonly_fields(self, request, obj=None): # def get_readonly_fields(self, request, obj=None):
fields = list(self.readonly_fields) # fields = list(self.readonly_fields)
if obj is not None: # if obj is not None:
fields.extend(['casa_legislativa', 'categoria', 'tipo_contato', 'assunto', 'status', 'descricao', ]) # fields.extend(['casa_legislativa', 'categoria', 'tipo_contato', 'assunto', 'status', 'descricao', ])
if obj.status in [Ocorrencia.STATUS_RESOLVIDO, Ocorrencia.STATUS_FECHADO, Ocorrencia.STATUS_DUPLICADO]: # Fechados # if obj.status in [Ocorrencia.STATUS_RESOLVIDO, Ocorrencia.STATUS_FECHADO, Ocorrencia.STATUS_DUPLICADO]: # Fechados
fields.append('prioridade') # fields.append('prioridade')
return fields # return fields
def get_fieldsets(self, request, obj=None): def get_fieldsets(self, request, obj=None):
if obj is None: if obj is None:

Loading…
Cancel
Save