OdooWiki OCA HUB

Mexico - CFDI - Account

l10n_mx_cfdi_account folder_open OCA/l10n-mexico open_in_new
Accounting License: LGPL-3

This module provides electronic invoicing for Mexico:

  • Generation of electronic invoices compliant with the CFDI 4.0 standard.
  • Customization of fiscal documents according to user needs.
  • Centralized management of electronic invoices within Odoo.
  • Tracking and recording of issued and received fiscal documents.
  • Blocks signing a customer invoice or credit note when the receiver RFC is on SAT list 69-B (Presunto or Definitivo).

auto_awesome What this module does

AI-generated from the code · Odoo 19.0

This module connects Odoo invoices and payments to Mexico's CFDI 4.0 electronic invoicing system. Users can generate, cancel and download stamped CFDI documents, and the module blocks signing when the customer's tax ID appears on the SAT 69-B blacklist.

The module adds a CFDI tab to customer invoices, credit notes and payments. From there users pick the issuer, the receiver, the CFDI use, the payment method and the payment form; these last three are filled automatically from the customer record. A button generates the electronic document, which is stamped and then attached to the invoice chatter as XML and PDF.

Business rules applied before signing: - The issuer, the customer tax ID, tax regime, zip code, CFDI use, payment method and payment form must be set. - Every product line needs a SAT product code and a unit of measure. - If related CFDIs are selected, a relation type is required, and vice versa. - Signing is refused when the customer tax ID is on SAT list 69-B (Presunto or Definitivo).

When the company option 'Create CFDI on post' is enabled, the CFDI is created automatically when an invoice is posted. Reconciling a payment or a credit note can also trigger the payment CFDI or the credit note CFDI automatically, and undoing that reconciliation cancels them.

Three wizards are provided: creating a generic public CFDI, cancelling a CFDI with a reason and optional replacement, and downloading a ZIP of selected CFDI files. The invoice and payment PDF reports are adapted for Mexico, and customers can carry an addenda template that is appended to the stamped XML.

Depends on

Models and fields (14)
  • ir.ui.view · extends an existing modell10n_mx_edi_addenda_flag (Is an addenda?)
  • account.tax · extends an existing model
  • res.partner · extends an existing modell10n_mx_edi_addenda (Addenda), l10n_mx_edi_addenda_doc (Addenda Documentation), l10n_mx_edi_addenda_name, l10n_mx_edi_addenda_is_readonly
  • account.move · extends an existing modelissuer_id (Emisor), cfdi_posted (CFDI Posted), cfdi_use_id (Uso de CFDI), receiver_id (Receptor), cfdi_required (Requiere CFDI), payment_form_id (Forma de pago), cfdi_document_id (CFDI), related_cert_ids (Documentos), l10n_mx_cfdi_auto (CFDI Automatico), payment_method_id (Método de pago), cfdi_document_name (Folio CFDI), cfdi_document_state (CFDI Status), l10n_mx_cfdi_enabled (CFDI Habilitado), cfdi_document_relations (Related CFDIs), cfdi_data_in_attachments (CFDI data in attachments), cfdi_document_relation_type (Relation Type)
  • account.payment · extends an existing modelcfdi_use_id (Uso de CFDI), payment_form_id (Forma de pago), cfdi_document_id (CFDI), related_cert_ids (Documentos), l10n_mx_cfdi_auto (CFDI Automatico), cfdi_document_state (CFDI Status), l10n_mx_cfdi_enabled (CFDI Habilitado)
  • account.move.line · extends an existing modelcfdi_discount, cfdi_subtotal, cfdi_price_unit
  • res.config.settings · extends an existing modell10n_mx_cfdi_auto (Create CFDI on post)
  • account.move.reversal · extends an existing model
  • l10n_mx_cfdi.document · extends an existing modelrelated_invoice_id (Factura relacionada), related_payment_id (Pago relacionado)
  • account.payment.register · extends an existing modelpayment_form_id (Forma de Pago)
  • account.partial.reconcile · extends an existing model
  • l10n_mx_cfdi_account.document_cancel · new modelsingle_cancel, certificate_ids (Certificados), cancel_reason_id (Razón), related_invoices (Facturas Relacionadas), simulate_operation, requires_replacement, replacement_certificate_id (Reemplazo)
  • l10n_mx_cfdi_account.dl_cfdi_files_wizard · new modelzip_file, invoice_ids (Facturas), cfdi_document_ids (CFDI Documents)
  • l10n_mx_cfdi_account.generic_invoice_create · new modeldate (Fecha), year (Año), meses_id (Mes), move_ids (Facturas), issuer_id (Emisor), cfdi_use_id (Uso de CFDI), periodicity_id (Periodicity), payment_form_id (Forma de Pago), fiscal_regime_id (Régimen Fiscal), payment_method_id (Metodo de Pago)

Text generated by AI (DeepSeek) from reading the Odoo 19.0 code on GitHub; it may contain mistakes, so check the code before deciding. The module is very large and only part of the code was read. View the code on GitHub

Availability by version

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

Confirmation status: 2 confirmed, 7 with no information of 9 versions.

Sources · Odoo 19.0

Confirmed on 2026-11-03 in branch 19.0 of OCA/l10n-mexico.

terminal Installation and usage

OCA documentation · Odoo 19.0

Prior to using this module, create a PAC account with one of the supported PACs and complete the PAC connection steps in l10n_mx_cfdi Configuration (CFDI > PAC Settings, issuers / Registrar, series as needed).

Use this module after the PAC connection, issuers, and series are configured in l10n_mx_cfdi (see that module's Configuration).

Customers

  • In the Invoicing app, go to Customers > Customers.
  • Create or open a customer with the correct VAT (RFC) and fiscal name.
  • On the CFDI tab, set:
  • Fiscal regime
  • Default CFDI usage
  • Default payment method
  • Default payment form

Products

  • Go to Customers > Products (or open a product from Inventory).
  • Open an existing product or create a new one and enter the general information.
  • On the CFDI tab, set the SAT product code and unit of measure.

Invoices

  • Go to Customers > Invoices and create a new record.
  • Select the customer. The fiscal data on the partner CFDI tab is required for stamping.
  • Add products that have a SAT product code.
  • Open the CFDI tab and set the payment method and payment form.
  • Confirm the invoice; it is stamped with the Mexican authority through the configured PAC. Before signing, the module checks SAT list 69-B and refuses the stamp if the customer RFC is listed as Presunto or Definitivo. Generic RFCs (XAXX010101000 / XEXX010101000) are skipped.
  • Use Send to deliver the invoice to the customer.

Import CFDI

  • Attach the vendor bill XML file in the chatter.
  • Click the Load from file button.

Payments

If the invoice payment method is PPD, the payment is included in the CFDI lines when you register a payment.

No verified information in OCA: Configuration.

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.