Invoicing · 9 min read

CFDI 4.0 electronic invoicing in Odoo: payment complements, cancellations and setup

What a company operating in Mexico needs to issue CFDI 4.0 from Odoo, how it is set up, how payment complements and cancellations work, and the errors that block stamping.

How does electronic invoicing work in Odoo for Mexico?

In Mexico, every invoice must be a CFDI 4.0. Odoo handles it through its Mexican localization: it builds the CFDI from the invoice, signs it with your SAT digital seal certificate (CSD) and sends it to a PAC, an authorized provider that stamps it. You need an RFC, a tax regime, a valid CSD and a PAC account.

If your company is based in the United States or elsewhere and operates in Mexico through a Mexican entity, that entity invoices like any local company. CFDI 4.0 is the only valid version of the electronic invoice since April 1, 2023, according to the SAT's Annex 20. In Odoo the invoice comes from the sales order, is stamped with one click, and the XML and PDF stay on the invoice. This guide follows Odoo's documentation for Mexico.

What do you need to issue CFDI 4.0 from Odoo?

  • An RFC (Mexican tax ID) registered with the SAT, Mexico's tax authority, and your tax regime.
  • A valid digital seal certificate (CSD): the .cer file, the .key file and the key password. The CSD is issued by the SAT.
  • An account with a PAC. Odoo's documentation lists three: Solución Factible, Quadrum and SW Sapien (Smarter Web). Check the current list before signing up.
  • Your company's fiscal address with ZIP code, state and country, and the legal name exactly as registered with the SAT, without the entity type (no S.A. de C.V.).
  • Each customer's tax data: RFC, tax regime, ZIP code and country.
  • A SAT product code on every product or service.

Customer and product data is the most time-consuming part, because it is rarely complete in the old system. Fix it during the migration to Odoo, not on the day you need to stamp an invoice.

Which Odoo edition you need

In the editions comparison, Invoicing is in both Community and Enterprise, but full Accounting, which includes localizations, is Enterprise only. The Mexican chart of accounts (l10n_mx) is in the Community source code; the stamping module (l10n_mx_edi) is not. On Community, CFDI requires a third-party module or a PAC connector that has to be evaluated and maintained.

Samantha looks at a scale balancing a stack of coins against colored blocks
Edition, licenses and implementation cost: how much Odoo costs.

How do you set up CFDI 4.0 in Odoo?

At a high level, following Odoo's documentation. The base localization modules install automatically when Mexico is set as the company's country.

  1. Company: RFC, full address with ZIP code and tax regime.
  2. Taxes: SAT tax type and factor type on sales taxes.
  3. Products: a SAT code on every product; without it, stamping fails validation.
  4. PAC: the provider and your credentials in the Accounting settings.
  5. Certificates: upload the .key file with its password first, then the .cer certificate.
  6. Test: Odoo has a PAC test mode and the SAT publishes test certificates, so you can stamp with no tax effect before going live.

From invoice to SAT

  1. Samantha examines small blocks on a table with a magnifying glass
    01

    Tax data

    RFC, regime, ZIP code and SAT codes checked before invoicing.

  2. Samantha fits colored pieces into a board on a wooden base
    02

    Invoice and stamp

    Confirm the invoice, send it with the CFDI box ticked and Odoo stamps it through your PAC.

  3. Samantha points at a screen with colored blocks in front of two seated figures
    03

    XML and PDF to the customer

    The fiscal folio and XML stay on the invoice and are emailed along with the PDF.

  4. Samantha smiles next to a glowing ring of modules, surrounded by confetti
    04

    Payment complement

    On PPD invoices, each reconciled payment generates its own payment CFDI.

  5. Samantha, wearing a headset, holds a piece of a ring of modules next to a plant
    05

    Cancellation with a reason

    If there is a mistake, the invoice is cancelled with a SAT reason and replaced when needed.

How do payment complements work in Odoo?

Odoo decides whether an invoice is PUE or PPD from its due date or payment terms:

MethodWhen it applies in OdooPayment complement
PUE (single payment)Due within the same monthNot issued; only if forced, which Odoo flags as bad fiscal practice
PPD (deferred or installment payment)Due from the following month onYes: a type P CFDI for each payment
  • On PPD invoices the payment way cannot be To Define.
  • Once a payment is reconciled with a stamped invoice, the update payments button sends the complement and stores it in the CFDI tab.
  • If a payment was recorded wrong, the complement is cancelled from the invoice's CFDI tab and then updated with the SAT.

Credit notes are expense-type (egreso) CFDI and are linked to the original invoice through the add credit note button, which fills in the CFDI origin automatically. For sales to the general public, Odoo creates a global invoice that groups several transactions into one XML.

How do you cancel a stamped invoice in Odoo?

Every cancellation needs a SAT reason. From the invoice you request the cancellation and pick the reason:

ReasonWhen it is usedIn Odoo
01Invoice issued with errors, with a related documentCreate and stamp the replacement invoice first, then cancel the original
02Invoice issued with errors, no related documentCancellation is requested directly
03The transaction did not take placeCancellation is requested directly
04Nominative transaction related to a global invoiceCancellation is requested directly

In many cases the customer has to accept the cancellation in their SAT tax mailbox. According to Odoo's documentation this can take up to 72 hours; if the customer rejects it, the process has to be repeated. If the status goes back to Valid, the invoice may not be cancellable because it has related documents, such as a payment complement.

Common stamping errors and how to avoid them

  • A customer with an RFC but no country: Odoo's documentation warns it produces incorrect invoices.
  • Products without a SAT code: validation error when stamping.
  • A legal name that differs from the SAT record or includes the entity type.
  • A PPD invoice with the payment way set to To Define.
  • A contact named PUBLICO EN GENERAL: use the global invoice instead.
  • Negative invoice lines: Odoo asks you to use a discount product.
  • An expired CSD, or files uploaded in the wrong order: key first, then certificate.
  • Confusing the test environment with production: in test mode the SAT status always shows as not found.

Invoicing is one of the areas we connect at Odoo OS. Questions about editions and licenses are in the FAQ.

We review your current invoicing, your PAC and your tax data and tell you in writing which edition, which setup and what needs cleaning before you stamp.

Book an assessment

Frequently asked questions

Can Odoo issue CFDI 4.0 invoices?

Yes, with the Mexican localization: it builds the XML, signs it with your SAT digital seal certificate (CSD) and stamps it through a PAC you hold an account with.

Which PACs work with Odoo?

Odoo's documentation lists Solución Factible, Quadrum and SW Sapien (Smarter Web). Check the current list before signing up, since it can change.

Is Mexican e-invoicing included in Odoo Community?

The Mexican chart of accounts is in Community, but the stamping module is not. Community needs a third-party module or a PAC connector; Enterprise includes it in the localization.

Does Odoo generate payment complements?

Yes. On PPD invoices, once the payment is reconciled with the stamped invoice, Odoo sends the payment complement and stores it in the CFDI tab.

How do you cancel an invoice in Odoo?

From the invoice you request cancellation with one of the SAT reasons (01 to 04). With reason 01 you first stamp the replacement invoice. In many cases the customer must accept it in their SAT tax mailbox.

Can a foreign company use Odoo to invoice in Mexico?

Invoicing in Mexico requires a Mexican RFC, a tax regime and a CSD, usually through a Mexican entity. That entity sets up Odoo's Mexican localization like any local company.

Can I test stamping with no tax effect?

Yes. Odoo has a PAC test mode and the SAT publishes test certificates, so you can stamp sample invoices before going live.

Sources

Written by Samuel Hinojosa, WITS · Updated October 30, 2026 · Markdown

Samantha, the WITS agent, welcomes you in a pastel Guadalajara plaza next to the Minerva statue.

Contact

Start with an assessment.

We walk through your areas with you and give you, in writing, which modules, what migration, which integrations, how long it takes and what it costs. Before you sign anything.

Also by phone or WhatsApp at +52 56 6107 7931, or at ventas@wits.mx.
Guadalajara, Jalisco, Mexico.

Contact form

Do you use Odoo today?
Areas to implement
How many people would use it?

Thank you. We’ll be in touch shortly to schedule the assessment.

Message us on WhatsApp