Skip to content
Snippets Groups Projects
Commit 5fbb3149 authored by niyasraphy's avatar niyasraphy
Browse files

[FIX] l10n_cl: traceback on printing invoice without setting vat in company


when the vat is not configured in the company and on printing the invoice, the traceback is raised.

this is due to the calling of method _format_dotted_vat_cl that excepts the vat value as input, when the method is called without a vat value, the traceback is thrown.

add an if condition to check there is a vat configured in the company and then the  _format_dotted_vat_cl method is called only when there is a value in vat.

closes odoo/odoo#109114

X-original-commit: cadbe9e6
Signed-off-by: default avatarJosse Colpaert <jco@odoo.com>
parent 29359599
No related branches found
No related tags found
No related merge requests found
......@@ -50,7 +50,9 @@
<strong t-att-style="'color: %s;' % o.company_id.primary_color">
<br/>
<span style="line-height: 180%;">RUT:</span>
<span t-esc="o.company_id.partner_id._format_dotted_vat_cl(o.company_id.partner_id.vat)"/>
<t t-if="o.company_id.partner_id.vat">
<span t-esc="o.company_id.partner_id._format_dotted_vat_cl(o.company_id.partner_id.vat)"/>
</t>
<br/>
<span class="text-uppercase" t-esc="report_name"/>
<br/>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment