Here is Add edocument_ubl module (!2632) · Merge requests · Tryton / Tryton · GitLab the first step to generate UBL Invoice.
Since the proposal the version of UBL-2.4 has been published so we used this version as basis.
The implementation is very similar to the UN/CEFACT. We tried to keep it simple and we used only the main properties from the account_invoice module.
The implementation is complete now by including a parser.
It can parse the UBL examples.
Why did you use UBL 2.4 and not UBL BIS 3.0 which is recommended for electronic invoicing in Belgium?
Did you plan another template for UBL BIS 3.0 ?
Will you plan to attach pdf of original invoice inside UBL ?
Actual UBL file is not valid for Peppol : UBL viewer – B2Brouter Global
UBL BIS 3.0 is not a format per se but a customization based on UBL-2.1 see Peppol BIS Billing
No
Why?
Because peppol use format 3.0 Bis
But without the customization tag, Peppol is supposed to be a customization Peppol BIS 3.0, see Peppol BIS Billing 3.0 - May 2025 Release
Ok, but just adding the customization tag on the generated ubl invoice 2.4 file generated by Tryton will not make the file valid for Peppol Bis Billing 3.0.
We plan to use Babelway.net to send our invoices on the Peppol network. Babelway needs an ubl Peppol Bis Billing 3.0 file as incoming file. We try to test with the ubl file made by Tryton and the file is not valid.
Other Peppol site where we made tests requires also UBL Peppol Bis Billing 3.0
And just adding CustomizationID don’t make the trick…
Here are some examples files of UBL BIS Billing 3.0 : https://docs.peppol.eu/poacc/billing/3.0/files/BIS-Billing3-Examples.zip
We made a test with sample file base-example.xml on B2Brouter
Whoa! One more boring norm and implementers that does not respect its own default value.
Than what is the problem?
Some other needed tags are missing in the Tryton UBL file. To help you, we’ll make some tests to check which tags are missing to follow the UBL Peppol Bis Billing 3.0 norm.
I don’t think that will work for everyone. The norm is extremely general and allows countries to add their own requirements to make it more stricter. Tags which are not required in the norm, can be made required by a country.
For The Netherlands we must have the customization tag, and some other tags. I haven’t looked into it yet, but I got several errors. The validation services I used were NPa Peppol Test Tool and Validate e-invoice & XML files instantly – no signup needed – ecosio which are recommended by UBLKetentest.nl - Wiki.
To be clear, it is useless to report that such validation website consider that the file you generate is not valid unless you provide the proper error and the data used such that it can be reproduced.
UBL as any standard is as standard as the implementers want. So as for SEPA, it will require testing by everyone and report proper issues to construct a template that is as much compatible as possible.
I’m doing tests to adapt schema.
Here’s a good start for needed tags related to UBL Peppol Bis Billing 3.0 : Peppol BIS Billing 3.0 - May 2025 Release
The schema does not need to be adapted.
This is already implemented as it is basically the UBL-2 format.
Indeed. Most of the tags are common and already there.
Not common, it is the same format.
I still do not understand why anybody has yet published an actual error message (except the missing Customization tag).
After some first tests, here are the needed tags to be added in the actual xml template file to create a template which is UBL Peppol Bis Billing 3.0 compliant:
- CustomizationID
<cbc:CustomizationID>rn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0</cbc:CustomizationID>
- ProfileID
<cbc:ProfileID>urn:fdc:peppol.eu:2017:poacc:billing:01:1.0</cbc:ProfileID>
- EndpointID (Peppol BIS Billing 3.0 - May 2025 Release)
<cbc:EndpointID schemeID=“0208”>0440740581</cbc:EndpointID>
- PartyLegalEntity ( Peppol BIS Billing 3.0 - May 2025 Release )
<cac:PartyLegalEntity> <cbc:RegistrationName>Saluc SA</cbc:RegistrationName> <cbc:CompanyID>BE0440740581</cbc:CompanyID> </cac:PartyLegalEntity> - Description in
<cac:Item>should not be empty - Some amounts are missing in
<cac:LegalMonetaryTotal><cbc:LineExtensionAmount><cbc:TaxExclusiveAmount><cbc:TaxInclusiveAmount>
<cbc:UBLVersionID>2.4</cbc:UBLVersionID>should be removed
Some fields need to be configured in Tryton because they are also required:
- Payment Term should have a description field not empty
- Tax should have Unece code
The last version should fix those remarks if the render is called with specification='peppol-bis-3'.
Thank you Cédric !
Here are the latest validation errors ( B2Brouter ) with the generated xml document by Tryton with specification ‘peppol-bis-3’:
[BR-CO-15] Invoice total amount with VAT (BT-112) = Invoice total amount without VAT (BT-109) + Invoice total VAT amount (BT-110).
So <cbc:TaxExclusiveAmount> should be the same value as <cbc:LineExtensionAmount>
[BR-CO-09] The Seller VAT identifier (BT-31), the Seller tax representative VAT identifier (BT-63) and the Buyer VAT identifier (BT-48) shall have a prefix in accordance with ISO code ISO 3166-1 alpha-2 by which the country of issue may be identified. Nevertheless, Greece may use the prefix ‘EL’.
In my example, party have both tax identifiers (European VAT Number, Belgian Enterprise Number)
Belgian Enterprise Number is needed to have an EAS.
But ISO6523 has both identifiers (European VAT Number, Belgian Enterprise Number) and it seems it should be a European VAT Number that should be used for <cbc:CompanyID>
<cbc:CompanyID schemeID="0208">0440740581</cbc:CompanyID>
should be <cbc:CompanyID schemeID="0223">BE0440740581</cbc:CompanyID>
[PEPPOL-EN16931-R003] A buyer reference or purchase order reference MUST be provided.
<cbc:BuyerReference> should be there

