-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2185 from prefeiturasp/release/8.5.0
Release/8.5.0
- Loading branch information
Showing
67 changed files
with
3,055 additions
and
364 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
__version__ = "8.4.0" | ||
__version__ = "8.5.0" | ||
|
||
__version_info__ = tuple( | ||
[ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,43 @@ | ||
from rest_framework import mixins | ||
from rest_framework import mixins, status | ||
|
||
from rest_framework.permissions import IsAuthenticated | ||
|
||
from rest_framework.viewsets import GenericViewSet | ||
|
||
from ..serializers.tipo_conta_serializer import TipoContaSerializer | ||
from ...models import TipoConta | ||
from ...models import ContaAssociacao | ||
|
||
from rest_framework.response import Response | ||
|
||
class TiposContaViewSet(mixins.ListModelMixin, | ||
mixins.RetrieveModelMixin, | ||
mixins.CreateModelMixin, | ||
mixins.UpdateModelMixin, | ||
mixins.DestroyModelMixin, | ||
GenericViewSet): | ||
permission_classes = [IsAuthenticated] | ||
lookup_field = 'uuid' | ||
queryset = TipoConta.objects.all() | ||
queryset = TipoConta.objects.all().order_by('nome') | ||
serializer_class = TipoContaSerializer | ||
|
||
def get_queryset(self): | ||
qs = TipoConta.objects.all() | ||
|
||
nome = self.request.query_params.get('nome') | ||
|
||
if nome is not None: | ||
qs = qs.filter(nome__unaccent__icontains=nome) | ||
|
||
return qs.order_by('nome') | ||
|
||
def destroy(self, request, *args, **kwargs): | ||
instance = self.get_object() | ||
|
||
tem_cadastrada_com_esse_tipo = ContaAssociacao.objects.filter(tipo_conta=instance).exists() | ||
if tem_cadastrada_com_esse_tipo: | ||
return Response({"erro": "Essa operação não pode ser realizada. Há associações cadastradas com esse tipo de conta."}, status=status.HTTP_400_BAD_REQUEST) | ||
|
||
self.perform_destroy(instance) | ||
|
||
return Response(status=status.HTTP_204_NO_CONTENT) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Generated by Django 3.1.14 on 2023-07-04 12:11 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('core', '0335_auto_20230620_1250'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterModelOptions( | ||
name='participante', | ||
options={'verbose_name': 'Participantes ata', 'verbose_name_plural': '17.0) Participantes ata'}, | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Generated by Django 3.1.14 on 2023-07-04 14:43 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('core', '0335_auto_20230620_1250'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='analisecontaprestacaoconta', | ||
name='observacao_solicitar_envio_do_comprovante_do_saldo_da_conta', | ||
field=models.TextField(blank=True, max_length=600, null=True, verbose_name='Observação solicitação de envio do comprovante do saldo da conta'), | ||
), | ||
migrations.AddField( | ||
model_name='analisecontaprestacaoconta', | ||
name='solicitar_envio_do_comprovante_do_saldo_da_conta', | ||
field=models.BooleanField(default=False, verbose_name='Solicitar envio do comprovante do saldo da conta'), | ||
), | ||
] |
52 changes: 52 additions & 0 deletions
52
.../core/migrations/0336_funcdregestaousuarios_funcsmegestaousuarios_funcuegestaousuarios.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# Generated by Django 3.1.14 on 2023-07-05 08:10 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('core', '0335_auto_20230620_1250'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='FuncDreGestaoUsuarios', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
], | ||
options={ | ||
'verbose_name': '[DRE] Gestão de usuários', | ||
'verbose_name_plural': '[DRE] Gestão de usuários', | ||
'permissions': (('access_gestao_usuarios_dre', '[DRE] Pode acessar Gestão de Usuários da DRE.'), ('change_gestao_usuarios_dre', '[DRE] Pode atualizar Gestão de Usuários da DRE.')), | ||
'managed': False, | ||
'default_permissions': (), | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name='FuncSmeGestaoUsuarios', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
], | ||
options={ | ||
'verbose_name': '[SME] Gestão de usuários', | ||
'verbose_name_plural': '[SME] Gestão de usuários', | ||
'permissions': (('access_gestao_usuarios_sme', '[SME] Pode acessar Gestão de Usuários da SME.'), ('change_gestao_usuarios_sme', '[SME] Pode atualizar Gestão de Usuários da SME.')), | ||
'managed': False, | ||
'default_permissions': (), | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name='FuncUeGestaoUsuarios', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
], | ||
options={ | ||
'verbose_name': '[UE] Gestão de usuários', | ||
'verbose_name_plural': '[UE] Gestão de usuários', | ||
'permissions': (('access_gestao_usuarios_ue', '[UE] Pode acessar Gestão de Usuários da UE.'), ('change_gestao_usuarios_ue', '[UE] Pode atualizar Gestão de Usuários da UE.')), | ||
'managed': False, | ||
'default_permissions': (), | ||
}, | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Generated by Django 3.1.14 on 2023-07-04 16:40 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('core', '0336_auto_20230704_1211'), | ||
('core', '0336_auto_20230704_1443'), | ||
] | ||
|
||
operations = [ | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Generated by Django 3.1.14 on 2023-07-10 10:39 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('core', '0337_merge_20230704_1640'), | ||
('core', '0336_funcdregestaousuarios_funcsmegestaousuarios_funcuegestaousuarios'), | ||
] | ||
|
||
operations = [ | ||
] |
18 changes: 18 additions & 0 deletions
18
sme_ptrf_apps/core/migrations/0338_tipoconta_permite_inativacao.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 3.1.14 on 2023-07-10 01:22 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('core', '0337_merge_20230704_1640'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='tipoconta', | ||
name='permite_inativacao', | ||
field=models.BooleanField(default=False, verbose_name='Permite inativação da conta?'), | ||
), | ||
] |
Oops, something went wrong.