|
@ -781,6 +781,7 @@ class RelatoriaCrud(MasterDetailCrud): |
|
|
public = [RP_LIST, RP_DETAIL] |
|
|
public = [RP_LIST, RP_DETAIL] |
|
|
|
|
|
|
|
|
class CreateView(MasterDetailCrud.CreateView): |
|
|
class CreateView(MasterDetailCrud.CreateView): |
|
|
|
|
|
|
|
|
def get_context_data(self, **kwargs): |
|
|
def get_context_data(self, **kwargs): |
|
|
context = super().get_context_data(**kwargs) |
|
|
context = super().get_context_data(**kwargs) |
|
|
|
|
|
|
|
@ -796,6 +797,7 @@ class RelatoriaCrud(MasterDetailCrud): |
|
|
|
|
|
|
|
|
parlamentares = [] |
|
|
parlamentares = [] |
|
|
for p in participacao: |
|
|
for p in participacao: |
|
|
|
|
|
if p.titular: |
|
|
parlamentares.append( |
|
|
parlamentares.append( |
|
|
[p.parlamentar.id, p.parlamentar.nome_parlamentar]) |
|
|
[p.parlamentar.id, p.parlamentar.nome_parlamentar]) |
|
|
context['form'].fields['parlamentar'].choices = parlamentares |
|
|
context['form'].fields['parlamentar'].choices = parlamentares |
|
|