diff --git a/addons/l10n_ro_edi/models/account_edi_xml_ubl_ciusro.py b/addons/l10n_ro_edi/models/account_edi_xml_ubl_ciusro.py index a04aedc026b..7543201171c 100644 --- a/addons/l10n_ro_edi/models/account_edi_xml_ubl_ciusro.py +++ b/addons/l10n_ro_edi/models/account_edi_xml_ubl_ciusro.py @@ -74,9 +74,9 @@ class AccountEdiXmlUBLRO(models.AbstractModel): def _get_document_type_code_vals(self, invoice, invoice_data): # EXTENDS 'account_edi_ubl_cii - # http://www.datypic.com/sc/ubl20/e-cbc_DocumentTypeCode.html vals = super()._get_document_type_code_vals(invoice, invoice_data) - vals['value'] = "380" if invoice.move_type == 'out_invoice' else "381" + # [UBL-SR-43] DocumentTypeCode should only show up on a CreditNote XML with the value '50' + vals['value'] = '50' if invoice.move_type == 'out_refund' else False return vals def _export_invoice_constraints(self, invoice, vals): diff --git a/addons/l10n_ro_edi/tests/test_files/from_odoo/ciusro_out_invoice.xml b/addons/l10n_ro_edi/tests/test_files/from_odoo/ciusro_out_invoice.xml index 6185123139e..685eb1d0f82 100644 --- a/addons/l10n_ro_edi/tests/test_files/from_odoo/ciusro_out_invoice.xml +++ b/addons/l10n_ro_edi/tests/test_files/from_odoo/ciusro_out_invoice.xml @@ -15,7 +15,6 @@ INV_2017_00001.pdf - 380 ___ignore___ diff --git a/addons/l10n_ro_edi/tests/test_files/from_odoo/ciusro_out_invoice_different_currency.xml b/addons/l10n_ro_edi/tests/test_files/from_odoo/ciusro_out_invoice_different_currency.xml index c2c48a03174..32d7a9d1c4b 100644 --- a/addons/l10n_ro_edi/tests/test_files/from_odoo/ciusro_out_invoice_different_currency.xml +++ b/addons/l10n_ro_edi/tests/test_files/from_odoo/ciusro_out_invoice_different_currency.xml @@ -15,7 +15,6 @@ INV_2017_00001.pdf - 380 ___ignore___ diff --git a/addons/l10n_ro_edi/tests/test_files/from_odoo/ciusro_out_refund.xml b/addons/l10n_ro_edi/tests/test_files/from_odoo/ciusro_out_refund.xml index df2c566dc8c..2095d2d4e08 100644 --- a/addons/l10n_ro_edi/tests/test_files/from_odoo/ciusro_out_refund.xml +++ b/addons/l10n_ro_edi/tests/test_files/from_odoo/ciusro_out_refund.xml @@ -14,7 +14,7 @@ RINV_2017_00001.pdf - 381 + 50 ___ignore___