[FIX] account_edi_ubl: Make UBL template EFFF-compatible

Since https://github.com/odoo/odoo/pull/69124,the UBL template is wrong because of the order of the elements in `PaymentMeans` because it is a sequence
`PaymentDueDate` must be in second position (before `InstructionId`)

https://www.w3schools.com/xml/el_sequence.asp
https://docs.oasis-open.org/ubl/prd1-UBL-2.1/xsd/common/UBL-CommonAggregateComponents-2.1.xsd
see `<xsd: complexType name = "PaymentMeansType">`

OPW-2468492

closes odoo/odoo#77560

X-original-commit: 8b20b130da9528e7c1cc12c1fb25b6c2632b00f7
Signed-off-by: Achraf <abz-odoo@users.noreply.github.com>
Signed-off-by: William André (wan) <wan@odoo.com>
This commit is contained in:
Achraf (abz)
2021-09-30 18:27:56 +00:00
parent eab2a5ce54
commit e3af8aee68
2 changed files with 2 additions and 2 deletions
@@ -131,8 +131,8 @@
</cac:AccountingCustomerParty>
<cac:PaymentMeans>
<cbc:PaymentMeansCode listID="UN/ECE 4461" t-esc="payment_means_code"/>
<cbc:InstructionID t-esc="record.payment_reference"/>
<cbc:PaymentDueDate t-esc="record.invoice_date_due"/>
<cbc:InstructionID t-esc="record.payment_reference"/>
<cac:PayeeFinancialAccount t-if="record.journal_id.bank_account_id">
<cbc:ID schemeName="IBAN" t-esc="record.journal_id.bank_account_id.acc_number"/>
<cac:FinancialInstitutionBranch t-if="record.journal_id.bank_account_id.bank_bic">
+1 -1
View File
@@ -107,8 +107,8 @@ class TestL10nBeEdi(AccountEdiTestCommon):
</AccountingCustomerParty>
<PaymentMeans>
<PaymentMeansCode listID="UN/ECE 4461">31</PaymentMeansCode>
<InstructionID>INV/2017/00001</InstructionID>
<PaymentDueDate>2017-01-01</PaymentDueDate>
<InstructionID>INV/2017/00001</InstructionID>
</PaymentMeans>
<TaxTotal>
<TaxAmount currencyID="Gol">220.000</TaxAmount>