Browse Source

[MERGE]

pull/7/merge
Humberto Arocha 12 years ago
parent
commit
dc0bfde56b
  1. 8
      account_financial_report/i18n/es.po
  2. 2
      account_financial_report/report/balance_full.rml
  3. 2
      account_financial_report/report/balance_full_13_cols.rml
  4. 2
      account_financial_report/report/balance_full_2_cols.rml
  5. 2
      account_financial_report/report/balance_full_4_cols.rml
  6. 4
      account_financial_report/report/balance_full_4_cols_analytic_ledger.rml
  7. 2
      account_financial_report/report/balance_full_5_cols.rml
  8. 2
      account_financial_report/report/balance_full_qtr_cols.rml
  9. 20
      account_financial_report/report/parser.py

8
account_financial_report/i18n/es.po

@ -685,3 +685,11 @@ msgstr "12 Meses | YTD"
msgid "Total"
msgstr "Total"
#. module: account_financial_report
#: code:addons/account_financial_report/report/parser.py:82
#, python-format
msgid "\n"
"VAT OF COMPANY NOT AVAILABLE"
msgstr "\n"
"VAT DE LA COMPAÑIA NO DISPONIBLE"

2
account_financial_report/report/balance_full.rml

@ -16,7 +16,7 @@
<td><para style="TOP_TITLE"></para></td>
<td><para style="TITLE_CENTER_NAME">
<font>[[ (company.name and company.name or 'NOMBRE DE COMPANIA NO DISPONIBLE')]]</font>
<font>[[ company.partner_id.vat and ('- %s-%s-%s'%(company.partner_id.vat[2:3],company.partner_id.vat[3:11],company.partner_id.vat[11:12])) or '' ]]</font>
<font>[[ get_vat_by_country(data['form']) ]]</font>
</para></td>
</tr>
<tr>

2
account_financial_report/report/balance_full_13_cols.rml

@ -17,7 +17,7 @@
<td><para style="TOP_TITLE"></para></td>
<td><para style="TITLE_CENTER_NAME">
<font>[[ (company.name and company.name or 'NOMBRE DE COMPANIA NO DISPONIBLE')]]</font>
<font>[[ company.partner_id.vat and ('- %s-%s-%s'%(company.partner_id.vat[2:3],company.partner_id.vat[3:11],company.partner_id.vat[11:12])) or '' ]]</font>
<font>[[ get_vat_by_country(data['form']) ]]</font>
</para></td>
</tr>
<tr>

2
account_financial_report/report/balance_full_2_cols.rml

@ -16,7 +16,7 @@
<td><para style="TOP_TITLE"></para></td>
<td><para style="TITLE_CENTER_NAME">
<font>[[ (company.name and company.name or 'NOMBRE DE COMPANIA NO DISPONIBLE')]]</font>
<font>[[ company.partner_id.vat and ('- %s-%s-%s'%(company.partner_id.vat[2:3],company.partner_id.vat[3:11],company.partner_id.vat[11:12])) or '' ]]</font>
<font>[[ get_vat_by_country(data['form']) ]]</font>
</para></td>
</tr>
<tr>

2
account_financial_report/report/balance_full_4_cols.rml

@ -17,7 +17,7 @@
<td><para style="TOP_TITLE"></para></td>
<td><para style="TITLE_CENTER_NAME">
<font>[[ (company.name and company.name or 'NOMBRE DE COMPANIA NO DISPONIBLE')]]</font>
<font>[[ company.partner_id.vat and ('- %s-%s-%s'%(company.partner_id.vat[2:3],company.partner_id.vat[3:11],company.partner_id.vat[11:12])) or '' ]]</font>
<font>[[ get_vat_by_country(data['form']) ]]</font>
</para></td>
</tr>
<tr>

4
account_financial_report/report/balance_full_4_cols_analytic_ledger.rml

@ -17,7 +17,7 @@
<td><para style="TOP_TITLE"></para></td>
<td><para style="TITLE_CENTER_NAME">
<font>[[ (company.name and company.name or 'NOMBRE DE COMPANIA NO DISPONIBLE')]]</font>
<font>[[ company.partner_id.vat and ('- %s-%s-%s'%(company.partner_id.vat[2:3],company.partner_id.vat[3:11],company.partner_id.vat[11:12])) or '' ]]</font>
<font>[[ get_vat_by_country(data['form']) ]]</font>
</para></td>
</tr>
<tr>
@ -34,7 +34,7 @@
</tr>
</blockTable>
</place>
<drawRightString x="270mm" y="5mm"> Pag.: <pageNumber/></drawRightString>
<drawRightString x="270mm" y="5mm"> Pag.: <pageNumber/>-<pageCount/></drawRightString>
</pageGraphics>
</pageTemplate>

2
account_financial_report/report/balance_full_5_cols.rml

@ -17,7 +17,7 @@
<td><para style="TOP_TITLE"></para></td>
<td><para style="TITLE_CENTER_NAME">
<font>[[ (company.name and company.name or 'NOMBRE DE COMPANIA NO DISPONIBLE')]]</font>
<font>[[ company.partner_id.vat and ('- %s-%s-%s'%(company.partner_id.vat[2:3],company.partner_id.vat[3:11],company.partner_id.vat[11:12])) or '' ]]</font>
<font>[[ get_vat_by_country(data['form']) ]]</font>
</para></td>
</tr>
<tr>

2
account_financial_report/report/balance_full_qtr_cols.rml

@ -17,7 +17,7 @@
<td><para style="TOP_TITLE"></para></td>
<td><para style="TITLE_CENTER_NAME">
<font>[[ (company.name and company.name or 'NOMBRE DE COMPANIA NO DISPONIBLE')]]</font>
<font>[[ company.partner_id.vat and ('- %s-%s-%s'%(company.partner_id.vat[2:3],company.partner_id.vat[3:11],company.partner_id.vat[11:12])) or '' ]]</font>
<font>[[ get_vat_by_country(data['form']) ]]</font>
</para></td>
</tr>
<tr>

20
account_financial_report/report/parser.py

@ -59,8 +59,27 @@ class account_balance(report_sxw.rml_parse):
'get_informe_text': self.get_informe_text,
'get_month': self.get_month,
'exchange_name': self.exchange_name,
'get_vat_by_country': self.get_vat_by_country,
})
self.context = context
def get_vat_by_country(self, form):
"""
Return the vat of the partner by country
"""
rc_obj = self.pool.get('res.company')
country_code=rc_obj.browse(self.cr, self.uid, form['company_id'][0]).partner_id.country_id.code or ''
string_vat= rc_obj.browse(self.cr, self.uid, form['company_id'][0]).partner_id.vat or ''
if string_vat:
if country_code=='MX':
return '%s' % (string_vat[2:])
elif country_code=='VE':
return '- %s-%s-%s'%(string_vat[2:3],string_vat[3:11],string_vat[11:12])
else:
return string_vat
else:
return _('\nVAT OF COMPANY NOT AVAILABLE')
def get_fiscalyear_text(self, form):
"""
@ -250,6 +269,7 @@ class account_balance(report_sxw.rml_parse):
ids2.append([aa_brw.id, True, True, aa_brw])
return ids2
#############################################################################
# CONTEXT FOR ENDIND BALANCE #
#######################################################################

Loading…
Cancel
Save