From 54fee5f5383fa2cbfe5680b0d886a892b131e182 Mon Sep 17 00:00:00 2001 From: Eliseu Egewarth Date: Wed, 6 Sep 2017 09:00:14 -0300 Subject: [PATCH] HOTFIX #1452 (#1458) * Ordena unidade tramitacao * Define ordering na model * HOTFIX: Corrige problema de makemigrations --merge ocasionado por git rebase Signed-off-by: Eliseu Egewarth --- .../migrations/0014_auto_20170905_0818.py | 19 +++++++++++++ sapl/materia/models.py | 1 + .../migrations/0009_auto_20170905_1617.py | 27 +++++++++++++++++++ sapl/parlamentares/models.py | 3 +++ .../migrations/0014_auto_20170905_1617.py | 23 ++++++++++++++++ sapl/sessao/models.py | 2 ++ 6 files changed, 75 insertions(+) create mode 100644 sapl/materia/migrations/0014_auto_20170905_0818.py create mode 100644 sapl/parlamentares/migrations/0009_auto_20170905_1617.py create mode 100644 sapl/sessao/migrations/0014_auto_20170905_1617.py diff --git a/sapl/materia/migrations/0014_auto_20170905_0818.py b/sapl/materia/migrations/0014_auto_20170905_0818.py new file mode 100644 index 000000000..afe266c58 --- /dev/null +++ b/sapl/materia/migrations/0014_auto_20170905_0818.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.7 on 2017-09-05 08:18 +from __future__ import unicode_literals + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('materia', '0013_adiciona_status_tramitacao'), + ] + + operations = [ + migrations.AlterModelOptions( + name='unidadetramitacao', + options={'ordering': ['orgao', 'comissao', 'parlamentar'], 'verbose_name': 'Unidade de Tramitação', 'verbose_name_plural': 'Unidades de Tramitação'}, + ), + ] diff --git a/sapl/materia/models.py b/sapl/materia/models.py index 9c95e1c44..e244fde60 100644 --- a/sapl/materia/models.py +++ b/sapl/materia/models.py @@ -803,6 +803,7 @@ class UnidadeTramitacao(models.Model): class Meta: verbose_name = _('Unidade de Tramitação') verbose_name_plural = _('Unidades de Tramitação') + ordering = ['orgao','comissao','parlamentar'] def __str__(self): if self.orgao and self.comissao and self.parlamentar: diff --git a/sapl/parlamentares/migrations/0009_auto_20170905_1617.py b/sapl/parlamentares/migrations/0009_auto_20170905_1617.py new file mode 100644 index 000000000..1290f069a --- /dev/null +++ b/sapl/parlamentares/migrations/0009_auto_20170905_1617.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.13 on 2017-09-05 16:17 +from __future__ import unicode_literals + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('parlamentares', '0008_adiciona_cargos_mesa'), + ] + + operations = [ + migrations.AlterModelOptions( + name='situacaomilitar', + options={'ordering': ['descricao'], 'verbose_name': 'Tipo Situação Militar', 'verbose_name_plural': 'Tipos Situações Militares'}, + ), + migrations.AlterModelOptions( + name='tipoafastamento', + options={'ordering': ['descricao'], 'verbose_name': 'Tipo de Afastamento', 'verbose_name_plural': 'Tipos de Afastamento'}, + ), + migrations.AlterModelOptions( + name='tipodependente', + options={'ordering': ['descricao'], 'verbose_name': 'Tipo de Dependente', 'verbose_name_plural': 'Tipos de Dependente'}, + ), + ] diff --git a/sapl/parlamentares/models.py b/sapl/parlamentares/models.py index db8ea8242..5d81dd33b 100644 --- a/sapl/parlamentares/models.py +++ b/sapl/parlamentares/models.py @@ -190,6 +190,7 @@ class SituacaoMilitar(models.Model): class Meta: verbose_name = _('Tipo Situação Militar') verbose_name_plural = _('Tipos Situações Militares') + ordering = ['descricao'] def __str__(self): return self.descricao @@ -360,6 +361,7 @@ class TipoDependente(models.Model): class Meta: verbose_name = _('Tipo de Dependente') verbose_name_plural = _('Tipos de Dependente') + ordering = ['descricao'] def __str__(self): return self.descricao @@ -432,6 +434,7 @@ class TipoAfastamento(models.Model): class Meta: verbose_name = _('Tipo de Afastamento') verbose_name_plural = _('Tipos de Afastamento') + ordering = ['descricao'] def __str__(self): return self.descricao diff --git a/sapl/sessao/migrations/0014_auto_20170905_1617.py b/sapl/sessao/migrations/0014_auto_20170905_1617.py new file mode 100644 index 000000000..6568001ee --- /dev/null +++ b/sapl/sessao/migrations/0014_auto_20170905_1617.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.13 on 2017-09-05 16:17 +from __future__ import unicode_literals + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('sessao', '0013_merge'), + ] + + operations = [ + migrations.AlterModelOptions( + name='tipoexpediente', + options={'ordering': ['nome'], 'verbose_name': 'Tipo de Expediente', 'verbose_name_plural': 'Tipos de Expediente'}, + ), + migrations.AlterModelOptions( + name='tiposessaoplenaria', + options={'ordering': ['nome'], 'verbose_name': 'Tipo de Sessão Plenária', 'verbose_name_plural': 'Tipos de Sessão Plenária'}, + ), + ] diff --git a/sapl/sessao/models.py b/sapl/sessao/models.py index dd136d3fd..a874fb5f4 100644 --- a/sapl/sessao/models.py +++ b/sapl/sessao/models.py @@ -76,6 +76,7 @@ class TipoSessaoPlenaria(models.Model): class Meta: verbose_name = _('Tipo de Sessão Plenária') verbose_name_plural = _('Tipos de Sessão Plenária') + ordering = ['nome'] def __str__(self): return self.nome @@ -264,6 +265,7 @@ class TipoExpediente(models.Model): class Meta: verbose_name = _('Tipo de Expediente') verbose_name_plural = _('Tipos de Expediente') + ordering = ['nome'] def __str__(self): return self.nome