[IMP] account_edi_ubl_cii: add TaxCurrencyCode
refactor TaxCurrencyCode as it is supposed to belong ignored ubl 2.0 according to the documentation http://www.datypic.com/sc/ubl20/t-ns19_InvoiceType.html this also allows future EDI that needs this node so that they won't need to create their own template Task-id: 3388222 Part-of: odoo/odoo#130617
This commit is contained in:
@@ -277,6 +277,9 @@
|
||||
<cbc:DocumentCurrencyCode
|
||||
t-att="vals.get('document_currency_code_attrs', {})"
|
||||
t-out="invoice.currency_id.name.upper()"/>
|
||||
<cbc:TaxCurrencyCode
|
||||
t-att="vals.get('tax_currency_code_attrs', {})"
|
||||
t-out="vals.get('tax_currency_code')"/>
|
||||
<t t-foreach="vals.get('invoice_period_vals_list', [])" t-as="foreach_vals">
|
||||
<cac:InvoicePeriod>
|
||||
<cbc:StartDate t-out="foreach_vals.get('start_date')"/>
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
t-out="vals.get('credit_note_type_code')"
|
||||
/>
|
||||
</xpath>
|
||||
<xpath expr="//*[local-name()='DocumentCurrencyCode']" position="after">
|
||||
<xpath expr="//*[local-name()='TaxCurrencyCode']" position="after">
|
||||
<cbc:BuyerReference
|
||||
xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2"
|
||||
xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
|
||||
|
||||
@@ -240,13 +240,6 @@
|
||||
</t>
|
||||
</xpath>
|
||||
|
||||
<!-- Add Tax Currency Code in compliance with rules BR-KSA-EN16931-02 and BR-KSA-68 -->
|
||||
<xpath expr="//*[local-name()='DocumentCurrencyCode']" position="after">
|
||||
<cbc:TaxCurrencyCode xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
|
||||
xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2"
|
||||
t-esc="invoice.company_currency_id.name"/>
|
||||
</xpath>
|
||||
|
||||
<!-- Add Previous Invoice Hash & Invoice Counter Value -->
|
||||
<xpath expr="//*[local-name()='BillingReference']" position="after">
|
||||
<t xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2"
|
||||
|
||||
@@ -259,6 +259,7 @@ class AccountEdiXmlUBL21Zatca(models.AbstractModel):
|
||||
'profile_id': 'reporting:1.0',
|
||||
'invoice_type_code_attrs': {'name': self._l10n_sa_get_invoice_transaction_code(invoice)},
|
||||
'invoice_type_code': self._l10n_sa_get_invoice_type(invoice),
|
||||
'tax_currency_code': invoice.company_currency_id.name,
|
||||
'issue_date': fields.Datetime.context_timestamp(self.with_context(tz='Asia/Riyadh'),
|
||||
invoice.l10n_sa_confirmation_datetime),
|
||||
'previous_invoice_hash': self._l10n_sa_get_previous_invoice_hash(invoice),
|
||||
|
||||
Reference in New Issue
Block a user