OdooWiki OCA HUB

Account Invoice UBL

account_invoice_ubl folder_open OCA/edi open_in_new
Accounting & Finance License: AGPL-3

This module adds support for UBL, the Universal Business Language (UBL) standard, on invoices. The UBL 2.1 standard became the ISO/IEC 19845 standard in December 2015 (cf the official announce).

With this module, you can generate customer invoices/refunds:

  • in PDF format with an embedded UBL XML file
  • as an XML file with an optional embedded PDF file

This module supports UBL version 2.1 (used by default) and 2.0.

auto_awesome What this module does

AI-generated from the code · Odoo 16.0

Generate UBL 2.1/2.0 XML files for customer invoices and refunds, either as a standalone XML (optionally with the PDF embedded) or embedded inside the invoice PDF. A button on posted customer invoices creates the XML file.

This module lets you produce electronic invoice files in the UBL standard for customer invoices and credit notes. On a posted customer invoice or refund, a new button "Generate UBL XML File" appears next to the reset-to-draft button; clicking it creates and attaches the XML file to the invoice.

The XML is built from the invoice data: header (number, dates, currency, note), buyer and supplier parties, delivery address, order and sales order references, payment means and payment terms, tax totals with VAT breakdown, legal monetary totals (untaxed, tax, total, prepaid, amount due) and one line per invoice line with quantity, unit price, discount and item information. The file is validated against the UBL schema before being produced.

In the accounting settings, under the e-invoicing section, you can enable "Embed PDF in UBL XML Invoice": the standalone XML then contains the invoice PDF in base64, which is required for example by the Belgian e-fff standard. When the company's PDF XML format is set to UBL, the invoice PDF itself automatically embeds the UBL XML file.

Installing the module sets the PDF XML format to UBL for all companies; uninstalling resets it to none. It works together with account.move, res.company and res.config.settings.

Models and fields (3)
  • res.company · extends an existing modelxml_format_in_pdf_invoice, embed_pdf_in_ubl_xml_invoice (Embed PDF in UBL XML Invoice)
  • account.move · new model
  • res.config.settings · extends an existing modelembed_pdf_in_ubl_xml_invoice

Text generated by AI (DeepSeek) from reading the Odoo 16.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub

Availability by version

Reviewed: 2026-11-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation status: 4 confirmed, 5 with no information of 9 versions.

terminal Installation and usage

OCA documentation · Odoo 16.0

In the menu Invoicing > Configuration > Settings > Invoicing, under Electronic Invoices, check the value of 2 options:

  • XML Format embedded in PDF invoice : if you want to have an UBL XML file embedded inside the PDF invoice, set it to Universal Business Language (UBL)
  • if you work directly with XML invoices and you want to have the PDF invoice in base64 inside the XML file, enable the Embed PDF in UBL XML Invoice.

No verified information in OCA: Installation, Usage.

info

Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.