[FIX] account_edi_ubl_cii: prevent translating some tags

Some tags in Factur-X are translated (for instance: 'INVOICE' becomes 'FACTURE')
and thus break the compliance tests of PDFA/3.
Also prevent translating 'VAT' into 'TVA' because it breaks the factur-x/UBL
tests.

task-3077791

closes odoo/odoo#106467

X-original-commit: 9cc535f9515414fd1140f163c3b2269e273fd8f1
Signed-off-by: Julien Van Roy <juvr@odoo.com>
Signed-off-by: Laurent Smet <las@odoo.com>
This commit is contained in:
Julien Van Roy
2022-11-25 06:40:04 +01:00
parent 55f1a6ecd7
commit cadef9c309
2 changed files with 21 additions and 21 deletions
@@ -60,7 +60,7 @@
<t t-foreach="tax_details['tax_details_per_record'][line]['tax_details'].values()"
t-as="tax_detail_vals">
<ram:ApplicableTradeTax t-if="tax_detail_vals['amount_type'] == 'percent'">
<ram:TypeCode>VAT</ram:TypeCode>
<ram:TypeCode t-translation="off">VAT</ram:TypeCode>
<ram:CategoryCode t-out="tax_detail_vals['tax_category_code']"/>
<ram:RateApplicablePercent t-out="tax_detail_vals['amount']"/>
</ram:ApplicableTradeTax>
@@ -248,7 +248,7 @@
<ram:ApplicableTradeTax>
<ram:CalculatedAmount
t-out="format_monetary(tax_detail_vals.get('calculated_amount'), 2)"/>
<ram:TypeCode>VAT</ram:TypeCode>
<ram:TypeCode t-translation="off">VAT</ram:TypeCode>
<ram:ExemptionReason t-out="tax_detail_vals.get('tax_exemption_reason')"/>
<ram:BasisAmount
t-out="format_monetary(tax_detail_vals['base_amount_currency'], 2)"/>
@@ -339,34 +339,34 @@
<pdfaExtension:schemas>
<rdf:Bag>
<rdf:li rdf:parseType="Resource">
<pdfaSchema:schema>Factur-X PDFA Extension Schema</pdfaSchema:schema>
<pdfaSchema:schema t-translation="off">Factur-X PDFA Extension Schema</pdfaSchema:schema>
<pdfaSchema:namespaceURI>urn:factur-x:pdfa:CrossIndustryDocument:invoice:1p0#</pdfaSchema:namespaceURI>
<pdfaSchema:prefix>fx</pdfaSchema:prefix>
<pdfaSchema:property>
<rdf:Seq>
<rdf:li rdf:parseType="Resource">
<pdfaProperty:name>DocumentFileName</pdfaProperty:name>
<pdfaProperty:valueType>Text</pdfaProperty:valueType>
<pdfaProperty:category>external</pdfaProperty:category>
<pdfaProperty:description>name of the embedded XML invoice file</pdfaProperty:description>
<pdfaProperty:name t-translation="off">DocumentFileName</pdfaProperty:name>
<pdfaProperty:valueType t-translation="off">Text</pdfaProperty:valueType>
<pdfaProperty:category t-translation="off">external</pdfaProperty:category>
<pdfaProperty:description t-translation="off">name of the embedded XML invoice file</pdfaProperty:description>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<pdfaProperty:name>DocumentType</pdfaProperty:name>
<pdfaProperty:valueType>Text</pdfaProperty:valueType>
<pdfaProperty:category>external</pdfaProperty:category>
<pdfaProperty:description>INVOICE</pdfaProperty:description>
<pdfaProperty:name t-translation="off">DocumentType</pdfaProperty:name>
<pdfaProperty:valueType t-translation="off">Text</pdfaProperty:valueType>
<pdfaProperty:category t-translation="off">external</pdfaProperty:category>
<pdfaProperty:description t-translation="off">INVOICE</pdfaProperty:description>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<pdfaProperty:name>Version</pdfaProperty:name>
<pdfaProperty:valueType>Text</pdfaProperty:valueType>
<pdfaProperty:category>external</pdfaProperty:category>
<pdfaProperty:description>The actual version of the Factur-X XML schema</pdfaProperty:description>
<pdfaProperty:name t-translation="off">Version</pdfaProperty:name>
<pdfaProperty:valueType t-translation="off">Text</pdfaProperty:valueType>
<pdfaProperty:category t-translation="off">external</pdfaProperty:category>
<pdfaProperty:description t-translation="off">The actual version of the Factur-X XML schema</pdfaProperty:description>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<pdfaProperty:name>ConformanceLevel</pdfaProperty:name>
<pdfaProperty:valueType>Text</pdfaProperty:valueType>
<pdfaProperty:category>external</pdfaProperty:category>
<pdfaProperty:description>The conformance level of the embedded Factur-X data</pdfaProperty:description>
<pdfaProperty:name t-translation="off">ConformanceLevel</pdfaProperty:name>
<pdfaProperty:valueType t-translation="off">Text</pdfaProperty:valueType>
<pdfaProperty:category t-translation="off">external</pdfaProperty:category>
<pdfaProperty:description t-translation="off">The conformance level of the embedded Factur-X data</pdfaProperty:description>
</rdf:li>
</rdf:Seq>
</pdfaSchema:property>
@@ -377,7 +377,7 @@
<rdf:Description xmlns:fx="urn:factur-x:pdfa:CrossIndustryDocument:invoice:1p0#" rdf:about="">
<fx:ConformanceLevel>EN 16931</fx:ConformanceLevel>
<fx:DocumentFileName>factur-x.xml</fx:DocumentFileName>
<fx:DocumentType>INVOICE</fx:DocumentType>
<fx:DocumentType t-translation="off">INVOICE</fx:DocumentType>
<fx:Version>1.0</fx:Version>
</rdf:Description>
</rdf:RDF>
@@ -139,7 +139,7 @@
<cbc:TaxExemptionReason
t-out="vals.get('tax_exemption_reason')"/>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
<cbc:ID t-translation="off">VAT</cbc:ID>
</cac:TaxScheme>
</t>
</template>