|
@ -41,6 +41,10 @@ def string_to_cm(texto): |
|
|
return tamanho |
|
|
return tamanho |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def label_text(text): |
|
|
|
|
|
return "%s: " % text |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class CasasLegislativasLabels(Report): |
|
|
class CasasLegislativasLabels(Report): |
|
|
|
|
|
|
|
|
""" |
|
|
""" |
|
@ -95,7 +99,7 @@ class CasasLegislativasLabels(Report): |
|
|
|
|
|
|
|
|
my_elements = [ |
|
|
my_elements = [ |
|
|
Label( |
|
|
Label( |
|
|
text=_(u'A Sua Excelência o(a) Senhor(a):'), |
|
|
text=label_text(_(u'A Sua Excelência o(a) Senhor(a)')), |
|
|
top=calc_top(0), left=calc_left, width=calc_width, |
|
|
top=calc_top(0), left=calc_left, width=calc_width, |
|
|
), |
|
|
), |
|
|
ObjectValue( |
|
|
ObjectValue( |
|
@ -120,8 +124,7 @@ class CasasLegislativasLabels(Report): |
|
|
ObjectValue( |
|
|
ObjectValue( |
|
|
attribute_name='cep', |
|
|
attribute_name='cep', |
|
|
top=calc_top(8), left=calc_left, width=calc_width, |
|
|
top=calc_top(8), left=calc_left, width=calc_width, |
|
|
get_value=lambda instance: |
|
|
get_value=lambda instance: "%s: %s" % (_(u"CEP"), instance.cep) |
|
|
_(u"CEP: %s") % instance.cep |
|
|
|
|
|
), |
|
|
), |
|
|
] |
|
|
] |
|
|
self.band_detail = DetailBand( |
|
|
self.band_detail = DetailBand( |
|
@ -144,7 +147,7 @@ class CasasLegislativasLabelsSemPresidente(CasasLegislativasLabels): |
|
|
|
|
|
|
|
|
my_elements = [ |
|
|
my_elements = [ |
|
|
Label( |
|
|
Label( |
|
|
text=_(u'A Sua Excelência o(a) Senhor(a):'), |
|
|
text=label_text(_(u'A Sua Excelência o(a) Senhor(a)')), |
|
|
top=calc_top(0), left=calc_left, width=calc_width, |
|
|
top=calc_top(0), left=calc_left, width=calc_width, |
|
|
), |
|
|
), |
|
|
ObjectValue( |
|
|
ObjectValue( |
|
@ -163,8 +166,7 @@ class CasasLegislativasLabelsSemPresidente(CasasLegislativasLabels): |
|
|
ObjectValue( |
|
|
ObjectValue( |
|
|
attribute_name='cep', |
|
|
attribute_name='cep', |
|
|
top=calc_top(8), left=calc_left, width=calc_width, |
|
|
top=calc_top(8), left=calc_left, width=calc_width, |
|
|
get_value=lambda instance: |
|
|
get_value=lambda instance: "%s: %s" % (_(u"CEP"), instance.cep) |
|
|
_(u"CEP: %s") % instance.cep |
|
|
|
|
|
), |
|
|
), |
|
|
] |
|
|
] |
|
|
self.band_detail = DetailBand( |
|
|
self.band_detail = DetailBand( |
|
@ -341,7 +343,7 @@ class InfoCasaLegislativa(ReportDefault): |
|
|
elements = [ |
|
|
elements = [ |
|
|
|
|
|
|
|
|
Label( |
|
|
Label( |
|
|
text=_(u"Tipo: "), |
|
|
text=label_text(_(u"Tipo")), |
|
|
left=posicao_left[0] * cm, |
|
|
left=posicao_left[0] * cm, |
|
|
top=posicao_top[0] * cm, |
|
|
top=posicao_top[0] * cm, |
|
|
), |
|
|
), |
|
@ -352,7 +354,7 @@ class InfoCasaLegislativa(ReportDefault): |
|
|
width=6 * cm, |
|
|
width=6 * cm, |
|
|
), |
|
|
), |
|
|
Label( |
|
|
Label( |
|
|
text=_(u"Região: "), |
|
|
text=label_text(_(u"Região")), |
|
|
left=posicao_left[2] * cm, |
|
|
left=posicao_left[2] * cm, |
|
|
top=posicao_top[1] * cm, |
|
|
top=posicao_top[1] * cm, |
|
|
), |
|
|
), |
|
@ -365,7 +367,7 @@ class InfoCasaLegislativa(ReportDefault): |
|
|
[instance.municipio.uf.regiao] |
|
|
[instance.municipio.uf.regiao] |
|
|
), |
|
|
), |
|
|
Label( |
|
|
Label( |
|
|
text=_(u"U.F.: "), |
|
|
text=label_text(_(u"UF")), |
|
|
left=posicao_left[4] * cm, |
|
|
left=posicao_left[4] * cm, |
|
|
top=posicao_top[2] * cm, |
|
|
top=posicao_top[2] * cm, |
|
|
), |
|
|
), |
|
@ -375,7 +377,7 @@ class InfoCasaLegislativa(ReportDefault): |
|
|
top=posicao_top[2] * cm, |
|
|
top=posicao_top[2] * cm, |
|
|
), |
|
|
), |
|
|
Label( |
|
|
Label( |
|
|
text=_(u"Município: "), |
|
|
text=label_text(_(u"Município")), |
|
|
left=posicao_left[6] * cm, |
|
|
left=posicao_left[6] * cm, |
|
|
top=posicao_top[3] * cm, |
|
|
top=posicao_top[3] * cm, |
|
|
), |
|
|
), |
|
@ -387,7 +389,7 @@ class InfoCasaLegislativa(ReportDefault): |
|
|
), |
|
|
), |
|
|
# Linha 3 |
|
|
# Linha 3 |
|
|
Label( |
|
|
Label( |
|
|
text=_(u"Endereço: "), |
|
|
text=label_text(_(u"Endereço")), |
|
|
left=posicao_left[8] * cm, |
|
|
left=posicao_left[8] * cm, |
|
|
top=posicao_top[4] * cm, |
|
|
top=posicao_top[4] * cm, |
|
|
), |
|
|
), |
|
@ -398,7 +400,7 @@ class InfoCasaLegislativa(ReportDefault): |
|
|
width=20 * cm, |
|
|
width=20 * cm, |
|
|
), |
|
|
), |
|
|
Label( |
|
|
Label( |
|
|
text=_(u"Bairro: "), |
|
|
text=label_text(_(u"Bairro")), |
|
|
left=posicao_left[10] * cm, |
|
|
left=posicao_left[10] * cm, |
|
|
top=posicao_top[5] * cm, |
|
|
top=posicao_top[5] * cm, |
|
|
), |
|
|
), |
|
@ -408,7 +410,7 @@ class InfoCasaLegislativa(ReportDefault): |
|
|
top=posicao_top[5] * cm, |
|
|
top=posicao_top[5] * cm, |
|
|
), |
|
|
), |
|
|
Label( |
|
|
Label( |
|
|
text=_(u"CEP: "), |
|
|
text=label_text(_(u"CEP")), |
|
|
left=posicao_left[12] * cm, |
|
|
left=posicao_left[12] * cm, |
|
|
top=posicao_top[6] * cm, |
|
|
top=posicao_top[6] * cm, |
|
|
), |
|
|
), |
|
@ -418,7 +420,7 @@ class InfoCasaLegislativa(ReportDefault): |
|
|
top=posicao_top[6] * cm, |
|
|
top=posicao_top[6] * cm, |
|
|
), |
|
|
), |
|
|
Label( |
|
|
Label( |
|
|
text=_(u"CNPJ: "), |
|
|
text=label_text(_(u"CNPJ")), |
|
|
left=posicao_left[14] * cm, |
|
|
left=posicao_left[14] * cm, |
|
|
top=posicao_top[7] * cm, |
|
|
top=posicao_top[7] * cm, |
|
|
), |
|
|
), |
|
@ -428,7 +430,7 @@ class InfoCasaLegislativa(ReportDefault): |
|
|
top=posicao_top[7] * cm, |
|
|
top=posicao_top[7] * cm, |
|
|
), |
|
|
), |
|
|
Label( |
|
|
Label( |
|
|
text=_(u"Telefone: "), |
|
|
text=label_text(_(u"Telefone")), |
|
|
left=posicao_left[16] * cm, |
|
|
left=posicao_left[16] * cm, |
|
|
top=posicao_top[8] * cm, |
|
|
top=posicao_top[8] * cm, |
|
|
), |
|
|
), |
|
@ -438,7 +440,7 @@ class InfoCasaLegislativa(ReportDefault): |
|
|
top=posicao_top[8] * cm, |
|
|
top=posicao_top[8] * cm, |
|
|
), |
|
|
), |
|
|
Label( |
|
|
Label( |
|
|
text=_(u"Presidente: "), |
|
|
text=label_text(_(u"Presidente")), |
|
|
left=posicao_left[18] * cm, |
|
|
left=posicao_left[18] * cm, |
|
|
top=posicao_top[9] * cm, |
|
|
top=posicao_top[9] * cm, |
|
|
), |
|
|
), |
|
|