# Odoo 20 Mexico localization: CFDI 4.0, payment complement, Carta Porte and DIOT

> Odoo 20 natively covers the most common electronic obligations before Mexico's tax administration (SAT): the CFDI 4.0 electronic invoice, the payment complement for invoices paid later or in installments, the Carta Porte 3.1 bill of lading for road transport, the DIOT vendor return, the electronic accounting XML files, addendas and import customs numbers. It does so with Odoo's own modules, installed with the Mexican localization; every document is sealed with the company's digital seal certificate and certified by an authorized provider (PAC). Most of it is configured in the Accounting settings and on contact, product and vehicle records.

- Author: Fabio Soto, Business Analyst, Quantum Garage
- Published: 2026-10-17T00:00:00-06:00
- Updated: 2026-10-17T00:00:00-06:00
- Odoo version: 20
- URL: https://web.quantumgarage.io/en/guides/odoo-mexico-localization/

## What the Mexican localization is

For a company arriving from abroad, the starting point is the rule the Odoo documentation sums up this way: in Mexico every good or service sold must be backed by an invoice, and when the customer does not need one, the company still issues a [CFDI](https://web.quantumgarage.io/en/glossary/cfdi/) to the general public. Every one of those invoices is an XML document certified by an SAT-authorized provider. The Mexican localization is the set of modules Odoo uses to adapt its accounting and invoicing to those rules.

According to the [official Odoo 20 documentation](https://www.odoo.com/documentation/20.0/applications/finance/fiscal_localizations/mexico.html), three modules are installed with it: `l10n_mx`, with the chart of accounts based on the SAT account grouping code and the most common taxes; `l10n_mx_edi`, which generates and validates electronic documents; and `l10n_mx_reports`, with the electronic accounting reports and the [DIOT](https://web.quantumgarage.io/en/glossary/diot/). Foreign trade, the [Carta Porte](https://web.quantumgarage.io/en/glossary/carta-porte/), customs numbers, Point of Sale and eCommerce have optional modules, which the documentation recommends installing only when the business needs them. Of the three core modules, only `l10n_mx` is open source: it is the only Mexican module in the 20.0 branch of Odoo's public repository. Electronic invoicing and the reports are part of Odoo Enterprise.

- **SAT**: Servicio de Administración Tributaria, Mexico's tax administration.
- **CFDI**: Comprobante Fiscal Digital por Internet, Mexico's electronic invoice, an XML document.
- **RFC**: Registro Federal de Contribuyentes, the Mexican taxpayer ID of every person or company.
- **[CSD](https://web.quantumgarage.io/en/glossary/csd/)**: Certificado de Sello Digital, the digital seal certificate a company uses to seal every CFDI it issues.
- **[PAC](https://web.quantumgarage.io/en/glossary/pac/)**: Proveedor Autorizado de Certificación, a provider authorized by the SAT to certify CFDI, a step known in Mexico as *timbrado* (stamping).

## What Odoo 20 covers, obligation by obligation

The localization spans several Odoo apps: each obligation lives where the operation behind it starts —the invoice in Accounting, the Carta Porte on the delivery, the customs number on the receipt— so each one is configured in a different place.

Table: What Odoo 20 does with each Mexican obligation and where it is configured

| Obligation                        | What Odoo 20 does                                                          | Where it is configured                                       | Module                          |
| --------------------------------- | -------------------------------------------------------------------------- | ------------------------------------------------------------ | ------------------------------- |
| CFDI 4.0 invoice and credit notes | Builds the XML, sends it for stamping and stores the fiscal folio          | Accounting settings, contacts and products                   | `l10n_mx_edi`                   |
| Payment complement                | Issues it from a paid PPD invoice                                          | Payment policy on the invoice, payment method on the payment | `l10n_mx_edi`                   |
| Carta Porte 3.1                   | Issues the transfer-type CFDI from the delivery or the receipt             | Vehicles in Fleet, warehouse and product weight              | `l10n_mx_edi_stock`             |
| DIOT                              | Builds the per-vendor report and exports it as TXT                         | Type of operation on each vendor                             | `l10n_mx` and `l10n_mx_reports` |
| Electronic accounting             | Generates the chart of accounts, trial balance and journal entry XML files | Chart of accounts with the grouping code                     | `l10n_mx_reports`               |
| Addendas                          | Adds XML nodes per contact or per invoice                                  | Addendas & Complementos (MX) menu                            | `l10n_mx_edi`                   |
| Customs numbers (pedimentos)      | Carries the customs number from the lot to the invoice                     | Landed costs and lot- or serial-tracked products             | `l10n_mx_edi_landing`           |

Every row comes from the official Odoo 20.0 documentation and from the `l10n_mx` code in the 20.0 branch (see Sources).

## Before stamping: RFC, CSD and PAC

The Odoo documentation sets three prerequisites: being registered with the SAT under a valid RFC, holding a valid CSD and choosing a PAC. The SAT describes the CSD as a certificate tied to the company's advanced electronic signature (*e.firma*), whose specific purpose is to seal the invoices it issues and fully identify their information ([SAT](https://www.sat.gob.mx/portal/public/tramites/certificado-de-sello-digital)). The SAT also publishes its [list of authorized certification providers](https://www.sat.gob.mx/portal/public/tramites/lista-de-proveedores-autorizados-de-certificacion-de-cfdi), and the Odoo 20 documentation names the three it works with: Solución Factible, Quadrum and SW Sapien.

With those in hand, configuration follows this order:

- **The company.** Full address with ZIP code, state, country and RFC. Under CFDI 4.0, the company name must match the legal name registered with the SAT, without the legal entity abbreviation, and the ZIP code must match too. The fiscal regime is set in the Accounting settings.
- **The currency.** A Mexican company must use the Mexican peso as its currency. Other currencies are handled with pricelists, and invoices and payments can be issued in them: with the Bank of Mexico set as the automatic rate service, the XML carries the exchange rate and the totals in both currencies. The rates of USD, EUR, GBP, JPY and CNY update daily.
- **Certificates.** The CSD `.key` file is uploaded with its password and the `.cer` file is linked to that key, both in Odoo's general settings.
- **The PAC.** Its name and credentials go in Accounting › Configuration › Settings, in the MX Electronic invoicing section. To test without credentials, Odoo provides a test environment with Solución Factible that needs no username or password.
- **Contacts and products.** Each customer needs the legal name registered with the SAT, RFC, ZIP code, country and fiscal regime. Each product needs its code from the SAT products and services catalog, set in the UNSPSC category field.

Two details matter for groups that operate from several locations. When the company uses branches, invoicing data comes from the parent company except the ZIP code, unless the branch has its own RFC, and each fiscal regime that needs to invoice separately requires its own branch. And because Odoo uses the user's time zone to invoice, a journal can be pinned to another time zone, such as America/Tijuana, with a system parameter.

## CFDI 4.0: the invoice

The SAT sets the version: CFDI moved to version 4.0 on January 1, 2022, and it has been the only valid version since April 1, 2023 ([SAT, Annex 20](http://omawww.sat.gob.mx/tramitesyservicios/Paginas/anexo_20.htm)). Odoo 20 invoicing is based on that version of Annex 20.

The invoice follows Odoo's standard flow and adds four fields: whether it is a CFDI to the general public, the CFDI usage, the payment policy and the payment method. If nobody sets the policy, Odoo computes it: [PUE](https://web.quantumgarage.io/en/glossary/pue-ppd/) when the due date falls within the current month, PPD when it falls in a later month. When the invoice is confirmed and sent with the CFDI box checked, Odoo submits it for stamping; once it comes back, the fiscal folio appears and the XML is stored on the CFDI tab and in the chatter. A button checks the document's status with the SAT.

Taxes carry two fields that CFDI 4.0 requires. The factor type —rate, quota or exempt— comes preloaded on the localization's taxes, and the `l10n_mx` code describes it as the CFDI 4.0 `TipoFactor` attribute. The tax object has eight possible values: Odoo sets 01 when a line has no taxes and 02 when it does, picks 06 or 07 when there is an income tax withholding without VAT, and the rest are entered manually.

The rest of daily operations is documented too:

- **Credit notes.** They are type "E" (*egreso*) documents linked to the original invoice through its fiscal folio; created from the invoice, the link is filled in automatically.
- **Cancellations.** Odoo asks for one of the four SAT cancellation reasons, 01 to 04. With reason 01, it creates the replacement invoice and cancels the original once the new one is stamped.
- **Foreign customers.** A foreign customer's CFDI carries the generic RFC XEXX010101000. Exports add the foreign trade complement, version 2.0, through the optional `l10n_mx_edi_extended` module, with the customer's full foreign address, its tax ID and the external trade checkbox on the contact.
- **Global invoice.** Sales to the general public for a period, from daily to bimonthly, can be grouped into one CFDI, matching the periodicity, month and year fields that Annex 20 added for these invoices.
- **Vendor bills.** They need their fiscal folio, which Odoo reads from the vendor's XML when it is attached to the draft bill.
- **Point of Sale and eCommerce.** The receipt can carry a QR code or a URL so customers invoice themselves, and the online shop adds an invoicing step at checkout.

## Payment complement and the PUE or PPD policy

- **PUE**: *Pago en una sola exhibición*, payment in a single installment: the invoice is paid when issued.
- **PPD**: *Pago en parcialidades o diferido*, payment in installments or deferred: the invoice is paid later or in parts.
- **[Payment complement](https://web.quantumgarage.io/en/glossary/payment-complement/) (REP)**: The type "P" (*pago*) CFDI that backs each payment received on a PPD invoice; REP stands for *recibo electrónico de pago*.

The SAT put version 2.0 of the payment receipt complement into effect on January 1, 2022, compatible with CFDI 4.0 and mandatory since April 1, 2023. Its page says it must be issued for payments received in installments, for payments not made in a single installment, and when payment arrives after the invoice was issued, even on credit sales paid in full later ([SAT](http://omawww.sat.gob.mx/tramitesyservicios/Paginas/recepcion_de_pagos.htm)).

In Odoo 20, complements are generated only when the invoice policy is PPD. The payment is registered like any other, with one difference: the payment method must be the actual one, so "To Define" is not available on a PPD payment. Reconciliation is what triggers the complement:

> “Click the Update Payments button to send the payment complement XML file to the government automatically and display it in the CFDI tab in both the invoice and the payment.”

Odoo, “Mexico”, official Odoo 20.0 documentation, accessed October 17, 2026.

A complement is cancelled from the CFDI tab of the related invoice; to replace it, the payment is unreconciled and the new one is linked to the old one through its fiscal folio. Financial factoring, where a company sells its receivables to a third party, is also recorded in bank reconciliation and issues its complement from the invoice with the same button.

The localization's taxes are cash basis, and the code shows it: in the 20.0 `l10n_mx` template, the 16% sales VAT and purchase VAT are due on payment, and the company gets its own journal, "Effectively Paid", where Odoo moves the tax from the transition account to the final account when the payment is registered.

## Carta Porte 3.1

The Carta Porte is Mexico's electronic bill of lading. The SAT describes it as the complement that adds to the CFDI the information on the goods, the origin, intermediate and destination locations, and the means by which they are transported ([SAT portal](https://www.sat.gob.mx/portal/public/tramites/complemento-carta-porte)). Version 3.1 was published on June 17, 2024 and has been the one in use since July 17, 2024 ([SAT](http://omawww.sat.gob.mx/tramitesyservicios/Paginas/complemento_carta_porte.htm)).

Odoo 20 issues it with the optional `l10n_mx_edi_stock` module, which also installs the Fleet app and requires Inventory and Sales. The document is a type "T" (*traslado*, transfer) CFDI, and unlike an invoice it starts on the delivery order or the receipt. Odoo handles two cases by distance:

Table: The two Carta Porte transport types in Odoo 20

| Case                | When it applies                     | What it requires                                                                                                                                   |
| ------------------- | ----------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| No Federal Highways | Distance to destination under 30 km | The same as an invoice: customer RFC and a UNSPSC code on every product                                                                            |
| Federal Transport   | Distance to destination over 30 km  | A freight vehicle in Fleet with its Mexican parameters, plate, model year and driver; operators with tax ID and license; product weight above zero |

The Carta Porte is generated once the delivery is validated. The transport type is selected on the additional info tab, the operator comes from the vehicle's driver and can be changed per delivery, and the distance to destination must always be greater than zero. The origin is the warehouse address, the PDF carries a QR code for the authorities to verify it, and there are fields for hazardous materials and for the customs data of imports and exports.

The documentation draws the scope: Odoo 20 covers road transport through the transfer-type CFDI. The income-type Carta Porte and air, rail and maritime transport are outside what the localization supports.

## DIOT

- **DIOT**: *Declaración Informativa de Operaciones con Terceros*, the informative return in which a company reports to the SAT the creditable and non-creditable VAT, withholdings and imports of its operations with vendors.

On the SAT portal, the DIOT is one of the informative returns for companies, filed with the SAT password on the [SAT's new platform](https://pstcdi.clouda.sat.gob.mx/).

Odoo 20 prepares it in two steps. The first is the report: the `l10n_mx` code defines a DIOT report that splits, vendor by vendor, VAT paid at 16%, at 8% in the northern border region and at 8% in the southern one, on imports and on intangible imports, each creditable or non-creditable, plus withheld, exempt, 0% and non-taxable amounts. Amounts come from the payments registered on vendor bills. The second is the file: from the tax return, the "DIOT (TXT)" action downloads a 54-column TXT file which, according to the Odoo documentation, is uploaded to the SAT form, reducing manual entry.

For the file to come out clean, every vendor needs its tax ID, country and type of operation, the last one on the contact's Accounting tab. Foreign vendors must have their country set. Type "87 - Global Operations" merges those vendors under the generic RFC XAXX010101000.

## Electronic accounting

The SAT describes electronic accounting as the tool for submitting, monthly, quarterly or semiannually as applicable, the accounting records and entries of the transactions carried out ([SAT](https://www.sat.gob.mx/portal/public/tramites/contabilidad-electronica)). Odoo 20 generates its three XML files according to the Electronic Accounting Technical Annex 1.3:

Table: Electronic accounting XML files in Odoo 20

| XML               | Where it is generated                       | Detail                                                                                                                                 |
| ----------------- | ------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| Chart of accounts | Trial balance, SAT chart of accounts button | Every account must follow the grouping code: `NNN.XX.YY`, `NNN.XX.YYY` or `NNN.XX.YYY.ZZ`                                              |
| Trial balance     | Trial balance, SAT (XML) action             | Normal or supplementary; month 13 is built with an entry flagged as that month's closing                                               |
| Journal entries   | General ledger, XML (Polizas) action        | Four export types: tax audit, audit certification, return of goods and compensation, with the order or process number the SAT provides |

The chart of accounts validates the structure when each account is created. Month 13 and the journal entry export use two modules besides `l10n_mx_reports`: `l10n_mx_reports_closing` and `l10n_mx_xml_polizas`. The localization also includes a balance sheet based on Mexican standard NIF B-6 and a profit and loss statement based on NIF B-3. The Odoo documentation recommends reviewing every report with an accountant before sending it, because obligations vary by fiscal regime.

## Addendas

- **[Addenda](https://web.quantumgarage.io/en/glossary/addenda/)**: Extra information added to the XML of an invoice after it is stamped, beyond the legal requirements.
- **Complemento**: Fiscal information that reports specific operations and is added to the XML before stamping.

In Odoo 20 both are configured in Accounting › Configuration › Addendas & Complementos (MX): each record holds the code of the node injected into the XML. An addenda assigned to a contact goes on all of its invoices, and it can also be chosen invoice by invoice on the other info tab; a contact or an invoice can carry more than one. The documentation notes that fields beyond standard Odoo may be needed and that this configuration may require technical knowledge.

## Customs numbers (pedimentos)

- **[Pedimento](https://web.quantumgarage.io/en/glossary/pedimento/)**: The Mexican customs declaration certifying that the duties and taxes of an import or export were paid.

When the goods being invoiced come from a first-hand import, the Odoo 20 documentation explains that Annex 20 requires the customs number on every product line, along with the document date. Odoo handles it with the optional `l10n_mx_edi_landing` module, together with Inventory, Purchase and Sales, and builds it on landed costs:

1. Landed costs are enabled in the Inventory settings.
2. The product is tracked by lot or serial number, invoiced on delivered quantities and valued by lot or serial number, with FIFO or average cost.
3. Once the purchase receipt is validated, a landed cost is created on it with the customs number.
4. When the sale is invoiced, each line carries the customs number of the lots shipped; if there is more than one, Odoo splits the line by quantity and customs number.

Once entered, the customs number cannot be edited or repeated; a mistake is fixed from the lot or serial number record. The documentation warns against confusing this feature with foreign trade: the customs number goes with imports, and the foreign trade complement with exports.

## The rules change during the year

The CFDI version has not changed since 2022, but what surrounds it does. The SAT's Annex 20 page shows the CFDI 4.0 filling guide published on January 16, 2026, the error matrix updated on March 25, 2026, and the CFDI 4.0 catalogs updated on October 15, 2026. The Odoo documentation, for its part, recommends consulting an accountant before installing an optional module or sending a report. To follow those changes, [Radar Fiscal](https://nivolty.com/productos/#radar-fiscal), from Nivolty, monitors the SAT; stamping is still done by Odoo.

## How to get started

1. Gather the RFC, a valid CSD —the `.cer` and `.key` files and the key password— and an account with a PAC.
2. Enter the company data exactly as registered with the SAT: legal name without the entity abbreviation, ZIP code and fiscal regime, with the Mexican peso as company currency.
3. Upload the certificates and the PAC credentials, and run the first tests in the test environment.
4. Complete contacts with RFC, country, ZIP code and fiscal regime, and products with their UNSPSC code.
5. Check the factor type and tax object of every tax you create, and that VAT is due on payment.
6. Install the optional modules —Carta Porte, customs numbers, foreign trade— only if operations require them, and with an accountant.

If the company also runs payroll in Mexico, the [guide to Mexican payroll in Odoo](https://web.quantumgarage.io/en/guides/odoo-payroll-mexico/) covers what that localization includes and how the payslip is stamped, which depends on this localization's electronic invoicing module.

## Frequently asked questions

### Does Odoo support CFDI 4.0 e-invoicing in Mexico?

Yes. Odoo 20 builds the invoice XML according to version 4.0 of the SAT's Annex 20, seals it with the company's digital seal certificate (CSD) and sends it to an authorized certification provider (PAC). When the stamped document comes back, the invoice shows its fiscal folio and keeps the XML.

### How does Odoo issue the payment complement (REP)?

Register the payment of the PPD invoice like any other, with the actual payment method. Once the payment is reconciled with an invoice that already has a fiscal folio, the Update Payments button sends the complement XML to the SAT and shows it on the CFDI tab of both the invoice and the payment.

### Can a Mexican company invoice in US dollars in Odoo?

Yes. The company's currency must be the Mexican peso, but invoices and payments can be issued in other currencies. With the Bank of Mexico set as the rate service, the XML carries the exchange rate and the totals in both currencies.

### Can Odoo 20 issue the Carta Porte 3.1?

Yes, with the electronic delivery guide module: it issues the transfer-type CFDI from the delivery order or the receipt, for road transport. Federal transport requires the vehicle in the Fleet app, with its plate, model year and driver.

### Does Odoo prepare the DIOT?

Odoo builds the DIOT report per vendor from the payments registered on vendor bills and exports a 54-column TXT file which, per its documentation, is uploaded to the SAT form. Each vendor needs a tax ID, a country and a type of operation.

### Which PACs does Odoo work with?

The Odoo 20 documentation names three: Solución Factible, Quadrum and SW Sapien. It also provides a test environment with Solución Factible that needs no username or password.

## Sources

1. Odoo S.A., “Mexico”, official Odoo 20.0 documentation, fiscal localizations. <https://www.odoo.com/documentation/20.0/applications/finance/fiscal_localizations/mexico.html>. Accessed 2026-10-17T00:00:00-06:00.
2. Odoo S.A., “l10n_mx module (Mexico - Accounting)”, public odoo/odoo repository, 20.0 branch. <https://github.com/odoo/odoo/tree/20.0/addons/l10n_mx>. Accessed 2026-10-17T00:00:00-06:00.
3. Servicio de Administración Tributaria, “Formato de factura (Anexo 20)”, sat.gob.mx. <http://omawww.sat.gob.mx/tramitesyservicios/Paginas/anexo_20.htm>. Accessed 2026-10-17T00:00:00-06:00.
4. Servicio de Administración Tributaria, “Factura de recepción de pagos”, sat.gob.mx. <http://omawww.sat.gob.mx/tramitesyservicios/Paginas/recepcion_de_pagos.htm>. Accessed 2026-10-17T00:00:00-06:00.
5. Servicio de Administración Tributaria, “Complemento Carta Porte”, sat.gob.mx. <http://omawww.sat.gob.mx/tramitesyservicios/Paginas/complemento_carta_porte.htm>. Accessed 2026-10-17T00:00:00-06:00.
6. Servicio de Administración Tributaria, “Complemento Carta Porte”, SAT procedures and services portal. <https://www.sat.gob.mx/portal/public/tramites/complemento-carta-porte>. Accessed 2026-10-17T00:00:00-06:00.
7. Servicio de Administración Tributaria, “Certificado de Sello Digital”, SAT procedures and services portal. <https://www.sat.gob.mx/portal/public/tramites/certificado-de-sello-digital>. Accessed 2026-10-17T00:00:00-06:00.
8. Servicio de Administración Tributaria, “Lista de Proveedores Autorizados de Certificación de CFDI”, SAT procedures and services portal. <https://www.sat.gob.mx/portal/public/tramites/lista-de-proveedores-autorizados-de-certificacion-de-cfdi>. Accessed 2026-10-17T00:00:00-06:00.
9. Servicio de Administración Tributaria, “Declaraciones y pagos para empresas (Informativas, DIOT)”, SAT procedures and services portal. <https://www.sat.gob.mx/portal/public/tramites/declaraciones-pm>. Accessed 2026-10-17T00:00:00-06:00.
10. Servicio de Administración Tributaria, “Contabilidad electrónica”, SAT procedures and services portal. <https://www.sat.gob.mx/portal/public/tramites/contabilidad-electronica>. Accessed 2026-10-17T00:00:00-06:00.
