[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#109133 X-original-commit: cadbe9e632c17efc0e68409df6fe8789f3f1dd14 Signed-off-by: Josse Colpaert <jco@odoo.com>
This commit is contained in:
committed by
Josse Colpaert
parent
629afd2ac5
commit
964dabd8d9
@@ -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-out="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-out="o.company_id.partner_id._format_dotted_vat_cl(o.company_id.partner_id.vat)"/>
|
||||
</t>
|
||||
<br/>
|
||||
<span class="text-uppercase" t-out="report_name"/>
|
||||
<br/>
|
||||
|
||||
Reference in New Issue
Block a user