From c961a1fc0d14f310849e3aebacada40cf0fae803 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ses=C3=B3stris=20Vieira?= Date: Thu, 6 Aug 2020 12:43:41 -0300 Subject: [PATCH] =?UTF-8?q?Adiciona=20lista=20de=20servi=C3=A7os=20na=20ex?= =?UTF-8?q?porta=C3=A7=C3=A3o=20de=20Casas=20para=20CSV?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sigi/apps/casas/templates/casas/carrinho.html | 6 ++++++ sigi/apps/casas/views.py | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/sigi/apps/casas/templates/casas/carrinho.html b/sigi/apps/casas/templates/casas/carrinho.html index d0cd27b..e8796a6 100644 --- a/sigi/apps/casas/templates/casas/carrinho.html +++ b/sigi/apps/casas/templates/casas/carrinho.html @@ -186,6 +186,12 @@ value="Última alteração de endereco" class="action-select" checked="checked" /> +
  • + + + +
  • diff --git a/sigi/apps/casas/views.py b/sigi/apps/casas/views.py index 9eb7119..eb74f54 100644 --- a/sigi/apps/casas/views.py +++ b/sigi/apps/casas/views.py @@ -385,6 +385,11 @@ def export_csv(request): lista.append(casa.total_parlamentares) elif _(u"Última alteração de endereco") == atributo: lista.append(casa.ult_alt_endereco) + elif _(u"Servicos SEIT") == atributo: + lista.append(", ".join([s.tipo_servico.nome.encode('utf-8') + for s in casa.servico_set.filter( + data_desativacao__isnull=True)]) + ) elif _(u"Nome contato") == atributo: if contatos: nomes = u", ".join([c.nome for c in contatos])