Browse Source

Merge branch '194-Documento_Protocolo'

pull/222/head
Marcio Mazza 9 years ago
parent
commit
edeef5dd4b
  1. 1
      materia/views.py
  2. 99
      protocoloadm/forms.py
  3. 19
      protocoloadm/migrations/0007_auto_20160218_1429.py
  4. 13
      protocoloadm/models.py
  5. 8
      protocoloadm/urls.py
  6. 170
      protocoloadm/views.py
  7. 74
      templates/protocoloadm/detail_doc_adm.html
  8. 12
      templates/protocoloadm/detail_doc_detail.html
  9. 51
      templates/protocoloadm/documento_acessorio_administrativo.html
  10. 7
      templates/protocoloadm/documento_acessorio_administrativo_edit.html
  11. 6
      templates/protocoloadm/protocolo_mostrar.html

1
materia/views.py

@ -775,7 +775,6 @@ class DocumentoAcessorioEditView(FormMixin, GenericView):
form = DocumentoAcessorioForm(request.POST)
materia = MateriaLegislativa.objects.get(id=kwargs['pk'])
documento = DocumentoAcessorio.objects.get(id=kwargs['id'])
if form.is_valid():
if 'excluir' in request.POST:
documento.delete()

99
protocoloadm/forms.py

@ -1,7 +1,7 @@
from datetime import date
from crispy_forms.helper import FormHelper
from crispy_forms.layout import HTML, Field, Fieldset, Layout
from crispy_forms.layout import HTML, Field, Fieldset, Layout, Submit
from django import forms
from django.forms import ModelForm
from django.utils.safestring import mark_safe
@ -11,7 +11,8 @@ from materia.models import TipoMateriaLegislativa
from sapl.layout import form_actions
from .models import (Autor, DocumentoAcessorioAdministrativo,
TipoDocumentoAdministrativo, TramitacaoAdministrativo)
DocumentoAdministrativo, TipoDocumentoAdministrativo,
TramitacaoAdministrativo)
def get_range_anos():
@ -19,6 +20,12 @@ def get_range_anos():
+ [(year, year) for year in range(date.today().year, 1960, -1)]
def tramitacao():
return [('', '--------'),
(True, 'Sim'),
(False, 'Não')]
TIPOS_PROTOCOLO = [('', 'Selecione'),
('0', 'Enviado'),
('1', 'Recebido')]
@ -82,14 +89,14 @@ class ProtocoloForm(forms.Form):
required=False,
queryset=TipoMateriaLegislativa.objects.all(),
empty_label='Selecione',
)
)
autor = forms.ModelChoiceField(
label='Autor',
required=False,
queryset=Autor.objects.all().order_by('tipo'),
empty_label='Selecione',
)
)
assunto = forms.CharField(label='Assunto', required=False)
@ -248,7 +255,7 @@ class ProtocoloMateriaForm(forms.Form):
required=False,
queryset=TipoMateriaLegislativa.objects.all(),
empty_label='Selecione',
)
)
num_paginas = forms.CharField(label='Núm. Páginas', required=True)
ementa = forms.CharField(
@ -259,7 +266,7 @@ class ProtocoloMateriaForm(forms.Form):
required=False,
queryset=Autor.objects.all().order_by('tipo'),
empty_label='Selecione',
)
)
observacao = forms.CharField(required=True,
widget=forms.Textarea,
@ -339,18 +346,29 @@ class DocumentoAcessorioAdministrativoForm(ModelForm):
'arquivo',
'assunto']
def __init__(self, *args, **kwargs):
def __init__(self, excluir=False, *args, **kwargs):
row1 = sapl.layout.to_row(
[('tipo', 4),
('nome', 4),
('data', 4)])
row2 = sapl.layout.to_row(
[('autor', 12)])
row3 = sapl.layout.to_row(
[('arquivo', 12)])
row4 = sapl.layout.to_row(
[('assunto', 12)])
more = []
if excluir:
more = [Submit('Excluir', 'Excluir')]
self.helper = FormHelper()
self.helper.layout = Layout(
Fieldset(
'Incluir Documento Acessório',
'tipo',
'nome',
'data',
'autor',
'arquivo',
'assunto',
form_actions()
row1, row2, row3, row4,
form_actions(more=more)
)
)
super(DocumentoAcessorioAdministrativoForm, self).__init__(
@ -408,3 +426,56 @@ class TramitacaoAdmForm(ModelForm):
)
super(TramitacaoAdmForm, self).__init__(
*args, **kwargs)
class DocumentoAdministrativoForm(ModelForm):
class Meta:
model = DocumentoAdministrativo
fields = ['tipo',
'numero',
'ano',
'data',
'numero_protocolo',
'assunto',
'interessado',
'tramitacao',
'dias_prazo',
'data_fim_prazo',
'observacao',
'texto_integral',
]
def __init__(self, *args, **kwargs):
row1 = sapl.layout.to_row(
[('tipo', 4), ('numero', 4), ('ano', 4)])
row2 = sapl.layout.to_row(
[('data', 6), ('numero_protocolo', 6)])
row3 = sapl.layout.to_row(
[('assunto', 12)])
row4 = sapl.layout.to_row(
[('interessado', 9), ('tramitacao', 3)])
row5 = sapl.layout.to_row(
[('texto_integral', 12)])
row6 = sapl.layout.to_row(
[('dias_prazo', 6), ('data_fim_prazo', 6)])
row7 = sapl.layout.to_row(
[('observacao', 12)])
self.helper = FormHelper()
self.helper.layout = Layout(
Fieldset('Identificação Básica',
row1, row2, row3, row4, row5),
Fieldset('Outras Informações',
row6, row7),
form_actions(more=[Submit('Excluir', 'Excluir')]),
)
super(DocumentoAdministrativoForm, self).__init__(
*args, **kwargs)

19
protocoloadm/migrations/0007_auto_20160218_1429.py

@ -0,0 +1,19 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('protocoloadm', '0006_auto_20160216_1015'),
]
operations = [
migrations.AlterField(
model_name='documentoadministrativo',
name='tramitacao',
field=models.BooleanField(choices=[(True, 'Sim'), (False, 'Não')], verbose_name='Em Tramitação?'),
),
]

13
protocoloadm/models.py

@ -2,7 +2,8 @@ from django.db import models
from django.utils.translation import ugettext_lazy as _
from materia.models import Autor, TipoMateriaLegislativa, UnidadeTramitacao
from sapl.utils import make_choices
from sapl.utils import YES_NO_CHOICES, make_choices
from uuid import uuid4
class TipoDocumentoAdministrativo(models.Model):
@ -17,12 +18,8 @@ class TipoDocumentoAdministrativo(models.Model):
return self.descricao
def get_docadm_media_path(instance, subpath, filename):
return './docadm/%s/%s/%s' % (instance, subpath, filename)
def texto_upload_path(instance, filename):
return get_docadm_media_path(instance, 'DocAdm', filename)
return '/'.join([instance._meta.model_name, str(uuid4()), filename])
class DocumentoAdministrativo(models.Model):
@ -40,7 +37,9 @@ class DocumentoAdministrativo(models.Model):
blank=True, null=True, verbose_name=_('Dias Prazo'))
data_fim_prazo = models.DateField(
blank=True, null=True, verbose_name=_('Data Fim Prazo'))
tramitacao = models.BooleanField(verbose_name=_('Em Tramitação?'))
tramitacao = models.BooleanField(
verbose_name=_('Em Tramitação?'),
choices=YES_NO_CHOICES)
assunto = models.TextField(verbose_name=_('Assunto'))
observacao = models.TextField(
blank=True, verbose_name=_('Observação'))

8
protocoloadm/urls.py

@ -1,8 +1,9 @@
from django.conf.urls import include, url
from protocoloadm.views import (AnularProtocoloAdmView,
ComprovanteProtocoloView,
CriarDocumentoProtocolo,
DetailDocumentoAdministrativo,
DocumentoAcessorioAdministrativoEditView,
DocumentoAcessorioAdministrativoView,
PesquisarDocumentoAdministrativo,
ProposicaoDetailView, ProposicaoReceberView,
@ -54,6 +55,9 @@ urlpatterns = [
DetailDocumentoAdministrativo.as_view(), name='detail_doc_adm'),
url(r'^protocoloadm/doc-ace-adm/(?P<pk>\d+)',
DocumentoAcessorioAdministrativoView.as_view(), name='doc_ace_adm'),
url(r'^protocoloadm/doc-ace-adm/edit/(?P<pk>\d+)/(?P<ano>\d+)',
DocumentoAcessorioAdministrativoEditView.as_view(),
name='doc_ace_adm_edit'),
url(r'^protocoloadm/(?P<pk>\d+)/tramitacao$',
TramitacaoAdmView.as_view(), name='tramitacao_adm'),
@ -66,6 +70,8 @@ urlpatterns = [
url(r'^protocoloadm/(?P<pk>\d+)/(?P<ano>\d+)/comprovante$',
ComprovanteProtocoloView.as_view(), name='comprovante_protocolo'),
url(r'^protocoloadm/(?P<pk>\d+)/(?P<ano>\d+)/criar_documento$',
CriarDocumentoProtocolo.as_view(), name='criar_documento'),
# TODO: move to Proposicoes app

170
protocoloadm/views.py

@ -9,7 +9,7 @@ from django.http import HttpResponseRedirect
from django.shortcuts import redirect
from django.utils.html import strip_tags
from django.utils.translation import ugettext_lazy as _
from django.views.generic import DetailView, ListView
from django.views.generic import CreateView, DetailView, ListView
from django.views.generic.base import TemplateView
from django.views.generic.edit import FormMixin
from vanilla import GenericView
@ -19,8 +19,9 @@ from materia.models import Proposicao, TipoMateriaLegislativa
from sapl.utils import create_barcode
from .forms import (AnularProcoloAdmForm, DocumentoAcessorioAdministrativoForm,
ProposicaoSimpleForm, ProtocoloDocumentForm, ProtocoloForm,
ProtocoloMateriaForm, TramitacaoAdmForm)
DocumentoAdministrativoForm, ProposicaoSimpleForm,
ProtocoloDocumentForm, ProtocoloForm, ProtocoloMateriaForm,
TramitacaoAdmForm)
from .models import (Autor, DocumentoAcessorioAdministrativo,
DocumentoAdministrativo, Protocolo,
StatusTramitacaoAdministrativo,
@ -302,6 +303,41 @@ class ProtocoloDocumentoView(FormMixin, GenericView):
return self.form_invalid(form)
def criar_documento(protocolo):
doc = {}
numero = Protocolo.objects.filter(
tipo_documento=protocolo.tipo_documento,
ano=protocolo.ano,
anulado=False).aggregate(Max('numero'))
doc['tipo'] = protocolo.tipo_documento
doc['ano'] = protocolo.ano
doc['data'] = protocolo.data
doc['numero_protocolo'] = protocolo.numero
doc['assunto'] = protocolo.assunto_ementa
doc['interessado'] = protocolo.interessado
doc['numero'] = numero['numero__max']
if doc['numero'] is None:
doc['numero'] = 1
return doc
class CriarDocumentoProtocolo(CreateView):
template_name = "protocoloadm/criar_documento.html"
form_class = DocumentoAdministrativoForm
def get_initial(self):
numero = self.kwargs['pk']
ano = self.kwargs['ano']
protocolo = Protocolo.objects.get(ano=ano, numero=numero)
return criar_documento(protocolo)
def get_success_url(self):
return reverse('detail_doc_adm', kwargs={'pk': self.object.pk})
class ProtocoloMostrarView(TemplateView):
template_name = "protocoloadm/protocolo_mostrar.html"
@ -516,63 +552,88 @@ class PesquisarDocumentoAdministrativo(TemplateView):
class DetailDocumentoAdministrativo(DetailView):
template_name = "protocoloadm/detail_doc_adm.html"
def get_tipos_doc(self):
return TipoDocumentoAdministrativo.objects.all()
def get(self, request, *args, **kwargs):
doc = DocumentoAdministrativo.objects.get(id=kwargs['pk'])
documento = DocumentoAdministrativo.objects.get(
id=self.kwargs['pk'])
form = DocumentoAdministrativoForm(
instance=documento)
return self.render_to_response({
'pk': kwargs['pk'],
'doc': doc,
'tipos_doc': TipoDocumentoAdministrativo.objects.all()
})
'form': form,
'pk': kwargs['pk']})
def post(self, request, *args, **kwargs):
if 'Salvar' in request.POST:
documento = DocumentoAdministrativo.objects.get(id=kwargs['pk'])
if request.POST['numero']:
documento.numero = request.POST['numero']
form = DocumentoAdministrativoForm(request.POST)
if request.POST['ano']:
documento.ano = request.POST['ano']
if request.POST['data']:
documento.data = datetime.strptime(
request.POST['data'], "%d/%m/%Y")
if form.is_valid():
doc = form.save(commit=False)
if 'texto_integral' in request.FILES:
doc.texto_integral = request.FILES['texto_integral']
doc.save()
return self.form_valid(form)
else:
return self.render_to_response({'form': form})
elif 'Excluir' in request.POST:
DocumentoAdministrativo.objects.get(
id=kwargs['pk']).delete()
return HttpResponseRedirect(self.get_success_delete())
if request.POST['numero_protocolo']:
documento.numero_protocolo = request.POST['numero_protocolo']
return HttpResponseRedirect(self.get_success_url())
if request.POST['assunto']:
documento.assunto = request.POST['assunto']
def get_success_delete(self):
return reverse('pesq_doc_adm')
if request.POST['interessado']:
documento.interessado = request.POST['interessado']
def get_success_url(self):
return reverse('detail_doc_adm', kwargs={
'pk': self.kwargs['pk']})
if request.POST['tramitacao']:
documento.tramitacao = request.POST['tramitacao']
if request.POST['dias_prazo']:
documento.dias_prazo = request.POST['dias_prazo']
class DocumentoAcessorioAdministrativoEditView(FormMixin, GenericView):
template_name = "protocoloadm/documento_acessorio_administrativo_edit.html"
if request.POST['data_fim_prazo']:
documento.data_fim_prazo = datetime.strptime(
request.POST['data_fim_prazo'], "%d/%m/%Y")
def get(self, request, *args, **kwargs):
doc = DocumentoAdministrativo.objects.get(
id=kwargs['pk'])
doc_ace = DocumentoAcessorioAdministrativo.objects.get(
id=kwargs['ano'])
form = DocumentoAcessorioAdministrativoForm(instance=doc_ace,
excluir=True)
if request.POST['observacao']:
documento.observacao = request.POST['observacao']
return self.render_to_response({'pk': self.kwargs['pk'],
'doc': doc,
'doc_ace': doc_ace,
'form': form})
documento.save()
elif 'Excluir' in request.POST:
DocumentoAdministrativo.objects.get(
id=kwargs['pk']).delete()
def post(self, request, *args, **kwargs):
form = DocumentoAcessorioAdministrativoForm(request.POST, excluir=True)
doc_ace = DocumentoAcessorioAdministrativo.objects.get(
id=kwargs['ano'])
return HttpResponseRedirect(self.get_success_url())
if form.is_valid():
if 'Salvar' in request.POST:
if 'arquivo' in request.FILES:
doc_ace.arquivo = request.FILES['arquivo']
doc_ace.documento = DocumentoAdministrativo.objects.get(
id=kwargs['pk'])
doc_ace.tipo = TipoDocumentoAdministrativo.objects.get(
id=form.data['tipo'])
doc_ace.nome = form.data['nome']
doc_ace.autor = form.data['autor']
doc_ace.data = datetime.strptime(
form.data['data'], '%d/%m/%Y')
doc_ace.assunto = form.data['assunto']
doc_ace.save()
elif 'Excluir' in request.POST:
doc_ace.delete()
return self.form_valid(form)
else:
return self.form_invalid(form)
def get_success_url(self):
return reverse('pesq_doc_adm')
pk = self.kwargs['pk']
return reverse('doc_ace_adm', kwargs={'pk': pk})
class DocumentoAcessorioAdministrativoView(FormMixin, GenericView):
@ -583,10 +644,9 @@ class DocumentoAcessorioAdministrativoView(FormMixin, GenericView):
doc = DocumentoAdministrativo.objects.get(
id=kwargs['pk'])
doc_ace_null = ''
try:
doc_acessorio = DocumentoAcessorioAdministrativo.objects.filter(
documento_id=kwargs['pk'])
except ObjectDoesNotExist:
doc_acessorio = DocumentoAcessorioAdministrativo.objects.filter(
documento_id=kwargs['pk'])
if not doc_acessorio:
doc_ace_null = 'Nenhum documento acessório \
cadastrado para este processo.'
@ -599,17 +659,13 @@ class DocumentoAcessorioAdministrativoView(FormMixin, GenericView):
def post(self, request, *args, **kwargs):
form = DocumentoAcessorioAdministrativoForm(request.POST)
if form.is_valid():
doc_acessorio = DocumentoAcessorioAdministrativo()
doc_acessorio.tipo = form.cleaned_data['tipo']
doc_acessorio.nome = form.cleaned_data['nome']
doc_acessorio.data = form.cleaned_data['data']
doc_acessorio.autor = form.cleaned_data['autor']
doc_acessorio.assunto = form.cleaned_data['assunto']
doc_acessorio.arquivo = request.FILES['arquivo']
doc_acessorio.documento = DocumentoAdministrativo.objects.get(
doc_ace = form.save(commit=False)
if 'arquivo' in request.FILES:
doc_ace.arquivo = request.FILES['arquivo']
doc = DocumentoAdministrativo.objects.get(
id=kwargs['pk'])
doc_acessorio.save()
doc_ace.documento = doc
doc_ace.save()
return self.form_valid(form)
else:
return self.form_invalid(form)

74
templates/protocoloadm/detail_doc_adm.html

@ -3,77 +3,5 @@
{% load crispy_forms_tags %}
{% block detail_content %}
<fieldset>
<legend>Formulário de Cadastro</legend>
<form method="POST">
{% csrf_token %}
<fieldset>
<legend>Identificação Básica</legend>
<div class="row">
<div class="col-md-4"><b>Tipo Documento</b></div>
<div class="col-md-4"><b>Número</b></div>
<div class="col-md-4"><b>Ano</b></div>
</div>
<div class="row">
<div class="col-md-4">
<select name="tipo_documento" disabled>
{% for tipo in tipos_doc %}
{% if doc.tipo.id == tipo.id %}
<option value="{{ tipo }}" selected> {{ tipo.sigla }} - {{ tipo.descricao }} </option>
{% endif %}
{% endfor %}
</select>
</div>
<div class="col-md-4"><input type="text" name="numero" value="{{ doc.numero }}"/></div>
<div class="col-md-4"><input type="text" name="ano" value="{{ doc.ano }}"/></div>
</div>
<div class="row">
<div class="col-md-6"><b>Data</b></div>
<div class="col-md-6"><b>Núm. Protocolo</b></div>
</div>
<div class="row">
<div class="col-md-6"><input type="text" name="data" class="dateinput" value="{{ doc.data|date:"d/m/Y" }}"/></div>
<div class="col-md-6"><input type="text" name="numero_protocolo" value="{{ doc.numero_protocolo }}"/></div>
</div>
<div class="row">
<div class="col-md-12"><b>Assunto</b></div>
</div>
<div class="row">
<div class="col-md-12"><textarea rows="4" cols="50" name="assunto">{{ d.assunto }}</textarea></div>
</div>
<div class="row">
<div class="col-md-6"><b>Interessado</b></div>
<div class="col-md-6"><b>Em Tramitação?</b></div>
</div>
<div class="row">
<div class="col-md-6"><input type="text" name="interessado" value="{{ doc.interessado }}"/></div>
<div class="col-md-6">
<select name="tramitacao">
<option value="True" {% if doc.tramitacao == True %} selected {% endif %} > Sim </option>
<option value="False" {% if doc.tramitacao == False %} selected {% endif %}> Não </option>
</select>
</div>
</div>
</fieldset>
<fieldset>
<legend>Outras Informações</legend>
<div class="row">
<div class="col-md-6"><b>Dias Prazo</b></div>
<div class="col-md-6"><b>Data Fim Prazo</b></div>
</div>
<div class="row">
<div class="col-md-6"><input type="text" name="dias_prazo" {% if doc.diasprazo != None %} value="{{ doc.dias_prazo }}" {% endif %} /></div>
<div class="col-md-6"><input type="text" name="data_fim_prazo" class="dateinput" {% if doc.data_fim_prazo != None %} value="{{ doc.data_fim_prazo }}" {% endif %} /></div>
</div>
<div class="row">
<div class="col-md-12"><b>Obervação</b></div>
</div>
<div class="row">
<div class="col-md-12"><textarea rows="4" cols="50" name="observacao">{{ documento.observacao }}</textarea></div>
</div>
</fieldset>
<input type="submit" value="Salvar" name="Salvar" class="primary button"/>
<input type="submit" value="Excluir" name="Excluir" class="primary button"/>
</form>
</fieldset>
{% crispy form %}
{% endblock %}

12
templates/protocoloadm/detail_doc_detail.html

@ -1,10 +1,10 @@
{% extends "crud/detail.html" %}
{% load i18n %}
{% block actions %} {% endblock %}
{% block sections_nav %}
<div class="actions btn-group pull-right" role="group">
<a href="#" class="btn btn-default">{% trans 'Inicio' %}</a>
<a href="#" class="btn btn-default">{% trans 'Documento Acessório' %}</a>
<a href="{% url 'tramitacao_adm' pk %}" class="btn btn-default">{% trans 'Tramitação' %}</a>
</div>
<div class="actions btn-group pull-right" role="group">
<a href="{% url 'detail_doc_adm' pk %}" class="btn btn-default">{% trans 'Inicio' %}</a>
<a href="{% url 'doc_ace_adm' pk %}" class="btn btn-default">{% trans 'Documento Acessório' %}</a>
<a href="{% url 'tramitacao_adm' pk %}" class="btn btn-default">{% trans 'Tramitação' %}</a>
</div>
{% endblock sections_nav %}

51
templates/protocoloadm/documento_acessorio_administrativo.html

@ -5,36 +5,39 @@
{% block detail_content %}
<fieldset>
<legend>Documento Administrativo</legend>
<div class="row">
<div class="col-md-4">Tipo: <b>{{doc.tipo.sigla}}</b></div>
<div class="col-md-4">Número: <b>{{doc.numero}}</b></div>
<div class="col-md-4">Ano: <b>{{doc.ano}}</b></div>
</div>
<div class="row">
<div class="col-md-4">Tipo: <b>{{doc.tipo.sigla}}</b></div>
<div class="col-md-4">Número: <b>{{doc.numero}}</b></div>
<div class="col-md-4">Ano: <b>{{doc.ano}}</b></div>
</div>
Assunto: <b>{{doc.assunto}}</b>
<br/><br/>
<fieldset>
<legend>Documentos Acessórios</legend>
{{ doc_ace_null }}
<table>
<tr>
<th>Documento</th>
<th>Nome</th>
<th>Tipo</th>
<th>Data</th>
<th>Autor</th>
</tr>
{% for d in doc_ace %}
{% if not doc_ace_null %}
<table style="width:100%">
<tr>
<td>{{d.arquivo}}</td>
<td>{{d.nome}}</td>
<td>{{d.tipo.descricao}}</td>
<td>{{d.data|date:"d/m/Y"}}</td>
<td>{{d.autor}}</td>
<th>Documento</th>
<th>Nome</th>
<th>Tipo</th>
<th>Data</th>
<th>Autor</th>
</tr>
{% endfor %}
</table>
{% for d in doc_ace %}
<tr>
<td>{{d.arquivo}}</td>
<td><a href="{% url 'doc_ace_adm_edit' doc.id d.id %}">{{d.nome}}</a></td>
<td>{{d.tipo.descricao}}</td>
<td>{{d.data|date:"d/m/Y"}}</td>
<td>{{d.autor}}</td>
</tr>
{% endfor %}
</table>
{% else %}
{{ doc_ace_null }}
{% endif %}
</fieldset>
<br/><br/>
{% crispy form %}
</fieldset>
{% endblock %}

7
templates/protocoloadm/documento_acessorio_administrativo_edit.html

@ -0,0 +1,7 @@
{% extends "protocoloadm/detail_doc_detail.html" %}
{% load i18n %}
{% load crispy_forms_tags %}
{% block detail_content %}
{% crispy form %}
{% endblock %}

6
templates/protocoloadm/protocolo_mostrar.html

@ -16,8 +16,8 @@
<br />
<strong>Documento Vinculado:</strong></br>
<a href="" class="secondary button">Criar Documento</a>
<br />
<a href="{% url 'comprovante_protocolo' protocolo.numero protocolo.ano %}" target="popup" onclick="window.open('{% url 'comprovante_protocolo' protocolo.numero protocolo.ano %}','Comprovante','width=800, height=600')">Comprovante
<a href="{% url 'criar_documento' protocolo.numero protocolo.ano %}" class="btn btn-primary">Criar Documento</a>
&nbsp;&nbsp;&nbsp;&nbsp;
<a href="{% url 'comprovante_protocolo' protocolo.numero protocolo.ano %}" target="popup" class="btn btn-primary" onclick="window.open('{% url 'comprovante_protocolo' protocolo.numero protocolo.ano %}','Comprovante','width=800, height=600')">Comprovante
</a>
{% endblock detail_content %}
Loading…
Cancel
Save