Odoo guides
OdooEN16931

EN16931 in Odoo

Odoo supports EN 16931 through two paths: OCA (Odoo Community Association) modules for Community edition, or the built-in Electronic Invoicing feature in Enterprise. This guide covers both approaches, with specific focus on the decimal precision configuration that causes most BR-CO-10 calculation errors in Odoo-generated invoices.

Prerequisites

  • Odoo 16.0 or later (14.0 minimum for OCA modules)
  • For Community: OCA modules account_invoice_ubl and account_einvoice_generate from GitHub
  • For Enterprise: Electronic Invoicing feature enabled (Settings → Invoicing)
  • Company settings complete: VAT ID with country prefix, legal address, bank account
  • Decimal Accuracy settings reviewed (default 2 digits often insufficient)

Step-by-Step Setup

1

Install e-invoicing module: OCA path or Enterprise path

OCA (Community): Apps → Update Apps List → search "account_invoice_ubl" → Install. Also install "account_einvoice_generate" for automatic attachment. Enterprise: Settings → Invoicing → check "Electronic Invoicing" feature → Save. Enterprise includes built-in EN 16931 support without additional modules.

2

Configure company VAT and legal entity data

Settings → Companies → select company → Edit. Critical fields: VAT (with country prefix, e.g., BE0123456789), Company Registry (KBO/BCE number for Belgium), Street address (must include postal code), Bank Account (IBAN format). These map to EN 16931 BT-31 (Seller VAT), BT-30 (Seller legal registration), BG-5 (Seller address), BG-17 (Payment means).

3

Fix decimal precision to avoid BR-CO-10 calculation errors

Settings → Technical → Database Structure → Decimal Accuracy. Find "Product Price" → change from default 2 to 4 or 6 digits. Also check "Product Unit of Measure" and "Account". This is the #1 cause of BR-CO-10 (line amount calculation mismatch) in Odoo. B2B pricing with many decimals (e.g., €0.0125/unit) rounds incorrectly with 2-digit precision.

4

Configure automatic UBL attachment on invoice validation

For OCA: Settings → Invoicing → Electronic Invoice → enable "Auto-generate UBL on invoice validation". For Enterprise: this is automatic when Electronic Invoicing is enabled. The UBL XML appears as an attachment on the validated invoice. File is named [invoice_number].xml.

5

Test invoice generation and validate structure

Invoicing → Customers → Invoices → Create test invoice. Confirm (validate) the invoice. Go to invoice → Attachments → download the UBL XML file. Open in text editor to verify: namespace should be "urn:oasis:names:specification:ubl:schema:xsd:Invoice-2", CustomizationID should reference EN 16931. Upload to Invoice Navigator for full business rule validation.

Common Odoo Errors

BR-CO-10Line Extension Calculation Error
Full guide →

Why this happens in Odoo

Odoo uses configurable decimal precision per field type. Default "Product Price" precision (2 digits) may be insufficient for B2B pricing with many decimals, causing line amount mismatches.

How to fix it

Settings > Technical > Database Structure > Decimal Accuracy > set "Product Price" to 4 digits. Recalculate existing invoices if needed.

BR-16Duplicate or Missing Line IDs
Full guide →

Why this happens in Odoo

When copying invoices or using templates in Odoo, line IDs may duplicate or not regenerate. OCA modules may have different line ID generation logic than Enterprise.

How to fix it

For OCA: Check account_invoice_ubl module version. For Enterprise: verify Electronic Invoicing settings generate unique line IDs.

BR-21Missing Item Description
Full guide →

Why this happens in Odoo

Generic service products in Odoo may have empty or minimal descriptions. EN16931 requires meaningful item descriptions, not just "Service" or "Product".

How to fix it

Update product templates with descriptive names. Use invoice line "Description" field for specific service details.

Pre-Export Checklist for Odoo

Before exporting EN16931 from Odoo, verify these items:

  • 1
    Verify company VAT ID is correctly formatted with country prefix
  • 2
    Confirm customer party data is complete (name, address, VAT ID)
  • 3
    Check decimal accuracy settings for Product Price (recommend 4 digits)
  • 4
    Ensure invoice lines have meaningful descriptions
  • 5
    Verify line totals match invoice total (no rounding errors)
  • 6
    Test with a few invoices before enabling automatic export

Testing Your Setup

Create a test invoice in Odoo and validate the UBL XML attachment. Download from invoice form > Attachments > UBL file.

💡 OCA provides test invoices in the account_invoice_ubl module tests. Check GitHub OCA/account-invoicing for sample data.

Validate Your Output

Export UBL XML attachment from Odoo invoice and upload to Invoice Navigator EN16931 validator.

Validate EN16931

FAQ

Does Odoo Community support EN16931?
Yes, through OCA (Odoo Community Association) modules. Install account_invoice_ubl and related modules from the OCA account-invoicing repository.
Can Odoo generate country-specific variants?
Yes, country localizations extend the base UBL output. Install country-specific modules (e.g., l10n_be_ubl for Belgium, l10n_fr_facturx for France) for national requirements.

Related Guides

Ready to Test Your Odoo Export?

Upload your EN16931 invoice and get instant compliance feedback with Odoo-specific recommendations.

Validate EN16931 Invoice