Browse Source

Alterando as ordens dos atributos do Relatorio de convenio e alterando de Estado para UF

diagnosticos
Starlone (Estagiario) 15 years ago
parent
commit
f72bc60ad7
  1. 40
      sigi/apps/convenios/reports.py

40
sigi/apps/convenios/reports.py

@ -32,13 +32,13 @@ class ConvenioReport(ReportDefault):
class band_page_header(ReportDefault.band_page_header):
label_top = ReportDefault.band_page_header.label_top
label_left = [0,1.5,6,9,11,13,15,17]
label_left = [0,1.5,7,9,11,13,15,17]
elements = list(ReportDefault.band_page_header.elements)
height = 4.7*cm
elements += [
Label(
text="Estado",
text="UF",
left=label_left[0]*cm,
top=label_top + 0.4*cm,
),
@ -46,15 +46,15 @@ class ConvenioReport(ReportDefault):
text="Municipio",
left=label_left[1]*cm,
top=label_top + 0.4*cm,
),
),
Label(
text="Número do Convenio",
text="Data de Adesão",
left=label_left[2]*cm,
top=label_top,
width=2*cm,
),
Label(
text="Data de Adesão",
text="Número do Convenio",
left=label_left[3]*cm,
top=label_top,
width=2*cm,
@ -64,15 +64,15 @@ class ConvenioReport(ReportDefault):
left=label_left[4]*cm,
top=label_top,
width=2*cm,
),
),
Label(
text="Data de Aceite",
text="Data de Publicação",
left=label_left[5]*cm,
top=label_top,
width=2*cm,
),
Label(
text="Data de Publicação",
text="Data de Aceite",
left=label_left[6]*cm,
top=label_top,
width=2*cm,
@ -92,7 +92,7 @@ class ConvenioReport(ReportDefault):
class band_detail(ReportDefault.band_detail):
label_left = [0,1.5,6,9,11,13,15,17]
label_left = [0,1.5,7,9,11,13,15,17]
elements=[
ObjectValue(
@ -102,34 +102,34 @@ class ConvenioReport(ReportDefault):
ObjectValue(
attribute_name='casa_legislativa.municipio.nome',
left=label_left[1]*cm
),
ObjectValue(
attribute_name='num_convenio',
left=label_left[2]*cm
),
),
ObjectValue(
attribute_name='data_adesao',
left=label_left[3]*cm,
left=label_left[2]*cm,
get_value=lambda instance:
instance.data_adesao.strftime('%d/%m/%Y') if instance.data_adesao != None else '-'
),
ObjectValue(
attribute_name='num_convenio',
left=label_left[3]*cm
),
ObjectValue(
attribute_name='data_retorno_assinatura',
left=label_left[4]*cm,
get_value=lambda instance:
instance.data_retorno_assinatura.strftime('%d/%m/%Y') if instance.data_retorno_assinatura != None else '-'
),
),
ObjectValue(
attribute_name='data_termo_aceite',
attribute_name='data_pub_diario',
left=label_left[5]*cm,
get_value=lambda instance:
instance.data_termo_aceite.strftime('%d/%m/%Y') if instance.data_termo_aceite != None else '-'
instance.data_pub_diario.strftime('%d/%m/%Y') if instance.data_pub_diario != None else '-'
),
ObjectValue(
attribute_name='data_pub_diario',
attribute_name='data_termo_aceite',
left=label_left[6]*cm,
get_value=lambda instance:
instance.data_pub_diario.strftime('%d/%m/%Y') if instance.data_pub_diario != None else '-'
instance.data_termo_aceite.strftime('%d/%m/%Y') if instance.data_termo_aceite != None else '-'
),
ObjectValue(
attribute_name='projeto.sigla',

Loading…
Cancel
Save