odoo/odoo#189747
Created by fw-bot
Statuses:
- legal/cla: Contributor License Agreement check
- ci/runbot: Odoo Test Suite
- ci/upgrade_enterprise: Test upgrades for enterprise master
- ci/template: Contact runbot team on discord for help.
- ci/style: Optional style check. Ignore it only if strictly necessary.
- ci/security: Required security check. Can only be ignored by security team.
- label
- odoo-dev:saas-17.2-16.0-opw-4261026-xrechnung_fallback_email-pta-Hejc-fw
- head
- e9b3f4fbc54df52dd1c123efe01556c2bc54e029
- merged
- 1 year ago by Bugfix, Anh Thao Pham (pta)
odoo/odoo | |
---|---|
16.0 | #189183 |
17.0 | #189717 |
saas-17.2 | #189747 |
saas-17.4 | #189771 |
18.0 | #189791 |
saas-18.2 | |
saas-18.3 | |
saas-18.4 | |
19.0 | |
master | #189804 |
[FW][FIX] {l10n_}account_edi_ubl_cii{_tests}: email as electronic address for xrechnung
Steps to reproduce:
- Install Accounting and l10n_de
- Switch to a German company
- Configure the customer invoice journal to enable "XRechnung UBL (Germany)"
- Create a German contact:
* with a complete address
* with an email address
* without a VAT number
- Create an invoice for the created contact
- Confirm the invoice
- Generate the electronic invoice
- Validate the generated XML on an online XRechnung ValidationError
Issue:
The XRechnung (UBL Invoice) is not valid because the buyer electronic address is missing (cbc:EndpointID).
Cause:
<cbc:EndpointID>
gets its value from contact's VAT, but the contact has no VAT.
Solution:
Since XRechnung 3.0.1, the email address can be used as electronic address with "EM" as schemeID.
So, fallback on email address if contact has no VAT.
Reference:
https://www.e-rechnung-bund.de/standard-xrechnung-3-0-1/
https://blog.seeburger.com/xrechnung-version-3-0-1-comes-into-force-on-february-1-2024/
https://erechnungsvalidator.service-bw.de/
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: #189183