Replace getattr by hasattr in report
(grafted from 1a0574d67704d7acbd7c224d906a4be12aaf3423) --HG-- branch : 8.0
This commit is contained in:
@@ -84,7 +84,7 @@ this repository contains the full copyright notices and license terms. -->
|
||||
<py:def function="TaxCategory(tax)">
|
||||
<cbc:ID py:if="tax.unece_category_code">${tax.unece_category_code}</cbc:ID>
|
||||
<cbc:Percent py:if="tax.type == 'percentage'">${format((tax.rate * 100).normalize(), 'f')}</cbc:Percent>
|
||||
<cbc:TaxExemptionReasonCode py:if="getattr(tax, 'vatex_code', None)">${tax.vatex_code}</cbc:TaxExemptionReasonCode>
|
||||
<cbc:TaxExemptionReasonCode py:if="hasattr(tax, 'vatex_code') and tax.vatex_code">${tax.vatex_code}</cbc:TaxExemptionReasonCode>
|
||||
<cbc:TaxExemptionReason py:if="tax.legal_notice">${tax.legal_notice}</cbc:TaxExemptionReason>
|
||||
<cac:TaxScheme py:if="tax.unece_code">
|
||||
<cbc:ID>${tax.unece_code}</cbc:ID>
|
||||
|
||||
Reference in New Issue
Block a user