OdooWiki OCA HUB

Account Invoice UBL Email Attachment

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

With module Account Invoice UBL, when sending an invoice by mail, only the PDF file is attached to the email and the UBL (XML) file is embedded inside the PDF.

Some accounting software cannot read the embedded XML from a PDF, so the import is only possible by manually generating the XML file.

With this module, when sending an invoice by mail, also the UBL file is automatically included, so that 2 attachments (PDF and XML) are present in the invoice mail.

auto_awesome What this module does

AI-generated from the code · Odoo 14.0

When you email a customer invoice, this module can automatically attach the UBL XML file alongside the PDF, so the recipient gets both files. A company-wide setting lets you turn this behaviour on or off.

Normally, when you send a customer invoice by email, only the PDF is attached and the UBL XML is embedded inside that PDF. Some accounting programs cannot read an XML embedded in a PDF, so this module adds the XML as a separate attachment.

Where it appears: - In Accounting settings, under the e-invoicing section, there is a new checkbox labelled "Include UBL XML in Invoice Email". - The setting is stored per company, so each company can decide independently.

What it does: - When the setting is active and you send a posted sales invoice by email, the system looks for the UBL XML file of that invoice. - If the XML file does not exist yet, it is generated automatically. - The XML is then added to the email attachments together with the usual PDF, so the customer receives two files. - If the setting is off, nothing changes and only the PDF is attached.

The module works together with the invoice email templates and the invoice sending action. It only applies to posted sales invoices that are eligible for UBL generation.

Models and fields (4)
  • res.company · extends an existing modelinclude_ubl_attachment_in_invoice_email (Include UBL XML in Invoice Email)
  • account.move · extends an existing model
  • mail.template · extends an existing model
  • res.config.settings · extends an existing modelinclude_ubl_attachment_in_invoice_email

Text generated by AI (DeepSeek) from reading the Odoo 14.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: 3 confirmed, 6 with no information of 9 versions.

terminal Installation and usage

OCA documentation · Odoo 14.0
  • Go to menu Invoicing > Configuration > Settings > Invoicing, under Electronic Invoices.
  • Check the value of Include UBL XML in Invoice Email, set to True if you want to include the UBL XML in the attachments when sending the invoice by email.

In the invoice form click on button Send & Print.

No verified information in OCA: Installation.

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.