México

Módulos

The following modules are automatically installed with the Mexican localization:

Nombre

Nombre técnico

Descripción

México - Contabilidad

l10n_mx

The default fiscal localization package adds accounting characteristics for the Mexican localization, such as: the most common taxes and the chart of accounts – based on the SAT account grouping code.

EDI para México

l10n_mx_edi

Includes all the technical and functional requirements to generate and validate electronics documents — based on the technical documentation published by the SAT. This allows you to send invoices (with or without addedums) and payment complements to the government.

Informes de la localización mexicana de Odoo

l10n_mx_reports

Adapts reports for Mexico’s electronic accounting: chart of accounts, trial balance, and DIOT.

Mexico - Month 13 Trial Balance

l10n_mx_reports_closing

Necessary to create the closing entry (also known as the month 13 move).

Exportación en XML de pólizas mexicanas de Odoo

l10n_mx_xml_polizas

Allows the export of XML files of journal entries for a compulsory audit.

The following modules are optional. It’s recommended to install them only if meeting a specific requirement for the business.

Nombre

Nombre técnico

Descripción

EDI para México (funciones avanzadas)

l10n_mx_edi_extended

Adds the external trade complement to invoices (a legal requirement for selling products to foreign countries).

México - Guía electrónica de entrega

l10n_mx_edi_stock

Le permite crear una Carta Porte: es un conocimiento de embarque que le prueba al gobierno que está enviando bienes entre A&B con un documento electrónico firmado.

Localización mexicana de Odoo para las existencias y el embarque

l10n_mx_edi_landing

Permite gestionar los números de identificación comercial (NICO) relacionados con los costes de embarque en documentos electrónicos.

CFDI 4.0 fields for sale orders

l10n_mx_edi_sale

Adds extra fields to the Sales module to comply with the Mexican Electronic Invoicing

Mexican Localization for the Point of Sale

l10n_mx_edi_pos

Adds extra fields to the Point of Sale module to comply with the Mexican Electronic Invoicing

Mexican Localization for eCommerce

l10n_mx_edi_website_sale

Adds extra fields to the eCommerce module to comply with the Mexican electronic invoicing requirements

Employees - Mexico

l10n_mx_hr

Adds extra fields to the Employees module to comply with local information for employees.

Mexico - Payroll with Accounting

l10n_mx_hr_payroll_account

Adds the required rules and parameters to manage local payroll calculation with the Payroll app.

Video tutorials

Videos on the Mexican localization are also available. Basic workflows and most topics covered on this page are also available in video format, please check out the following:

Localization overview

The Odoo Mexican localization modules allow for the signing of electronic invoices, according to the specifications of the SAT for version 4.0 of the CFDI, a legal requirement, as of January 1, 2022. These modules also add relevant accounting reports including the DIOT, enable foreign trade, and enable the creation of delivery guides.

Nota

In order to electronically sign any documents in Odoo, the Sign application must be installed.

Requerimientos

Es necesario que cumpla los siguientes requisitos antes de configurar los módulos de localización mexicana en Odoo:

  1. Be registered in the SAT with a valid RFC.

  2. Have a Certificado de Sello Digital / Digital Seal Certificate (CSD).

  3. Choose a PAC. Currently, Odoo works with the following PACs: Solución Factible, Quadrum, and SW Sapien - Smarter Web.

Empresa

After installing the correct modules, the next step is to verify that the company is configured with the correct data. To do so, go to Settings ‣ Users & Companies ‣ Companies, and select the company to configure.

Enter the full Address in the resulting form, including: ZIP code, State, Country, and RFC (Tax ID number).

According to the requirements of the CFDI 4.0, the name of the main company contact must match the business name registered in the SAT, without the legal entity abbreviation. This is the same for the ZIP code.

Importante

From a legal point of view, Mexican companies must use the local currency (MXN). To use another currency, let MXN be the default currency and use a pricelist instead.

Next, go to Accounting ‣ Settings, and scroll to the MX Electronic invoicing section. Under Service Tax Administration (SAT), select the Fiscal Regime that applies to the company from the drop-down list, and click Save.

Truco

In order to test the Mexican localization, configure the company with a real address within Mexico (including all fields). Add EKU9003173C9 as the Tax ID and ESCUELA KEMPER URGATE as the Company Name. For the Fiscal Regime, use General de Ley Personas Morales.

Contactos

Nota

Install the Contacts application to access contact records.

To create a contact that can be invoiced, go to Contacts ‣ Create. Then, enter the contact name, full Address including the ZIP code, State, Country, and RFC (Tax ID).

Importante

As with your own company, all contacts must have their correct business name registered in the SAT. This also applies to the Fiscal Regime, which needs to be added in the Sales & Purchase tab.

Advertencia

Having a RFC (Tax ID) set but no Country configured may result in incorrect invoices.

Impuestos

In order to properly sign invoices, set the Factor Type and Tax Object fields on sales taxes.

Tipo factor

Both the SAT Tax Type and Factor Type fields are pre-loaded in the default taxes. If new taxes are created, these fields must be set. To do so, go to Accounting ‣ Configuration ‣ Taxes, then fill both fields in the Advanced Options tab for all tax records, with the Tax Type set as Sales.

Odoo supports four groups of SAT Tax Types: IVA, ISR, IEPS, and Local Taxes.

Truco

México trabaja con dos tipos diferentes de IVA 0% para amoldarse a dos escenarios:

  • For 0% VAT, set the Factor Type as Tasa

  • For VAT Exempt, set the Factor Type as Exento

Objeto de impuestos

One requirement of the CFDI 4.0 is that the resulting XML file handles the breakdown of taxes of the operation in accordance with the regulation. There are three different possible values that are added in the XML file:

  • 01: Not subject to tax: This value is added automatically if the invoice line doesn’t contain any taxes.

  • 02: Subject to tax: This is the default configuration of any invoice line that contains taxes.

  • 03: Subject to tax and not forced to break down: This value can be triggered on demand for certain customers to replace the value 02.

To use the 03 value for a contact, navigate to the contact’s Sales & Purchase tab, and activate the No Tax Breakdown checkbox under the Fiscal Information section.

Importante

El valor Sin desglose de impuestos aplica solo a algunos regímenes fiscales o impuestos específicos. Le recomendamos que consulte a su contador antes de hacer cualquier modificación, así sabrá si es necesario para su negocio.

Otras configuraciones fiscales

The Mexican Localization uses cash basis taxes. When registering a payment, Odoo carries out the movement of taxes from the Cash Basis Transition Account to the account set in the Definition tab of the tax record set on the invoice or bill line. For such movement, a tax base account is used: (899.01.99 Base Imponible de Impuestos en Base a Flujo de Efectivo) in the journal entry when reclassifying taxes. Do not delete this account.

Productos

To configure products, go to Accounting ‣ Customers ‣ Products, then select a product to configure, or Create a new one. In the Accounting tab, in the UNSPSC Product Category field, select the category that represents the product. The process can be done manually, or through a bulk import.

Nota

All products need to have a SAT code associated with them in order to prevent validation errors.

Facturación electrónica

Credenciales del proveedor autorizado de certificación

After processing your Private Key (CSD) with the SAT, you must register directly with the PAC of your choice before you start creating invoices from Odoo.

Once you’ve created your account with any of these providers, go to Accounting ‣ Configuration ‣ Settings and navigate to the MX Electronic invoicing section. Under the Authorized Certification Provider (PAC) section, enter the name of your PAC with your credentials (PAC username and PAC password).

Configuración de las credenciales del PAC desde los ajustes de Contabilidad.

Truco

To test the electronic invoicing without credentials, activate the MX PAC test environment checkbox, and select Solucion Factible as the PAC. It is not required to add a username or password for a test environment.

Certificados .cer y .key

The digital certificates of the company must be uploaded within the Certificates section. To do so, navigate to Settings ‣ General Settings ‣ Certificates and Keys.

Under Manage your certificates, click the Keys link to access the Keys list view. Click Create, upload the digital Key file (.key file), add a Name to the key, and enter the Private key password.

From Settings ‣ General Settings ‣ Certificates and Keys, select Certificates to access the Certificate list view. Click Create, upload the digital Certificate (.cer file), add a Name to the certificate, and select the Private Key created on the previous step from the drop-down menu.

Nota

The Certificate Password and Public Key fields on Certificate records are optional.

Truco

In order to test the electronic invoicing, the following SAT test certificates are provided:

Contabilidad

Facturación electrónica

El proceso de facturación en Odoo está basado en la versión 4.0 del Anexo 20 de la facturación electrónica del SAT.

Facturas de cliente

Es necesario que cree una factura de cliente con el flujo de facturación estándar para comenzar a facturar desde Odoo.

Puede realizar cualquier modificación necesaria si el documento se encuentra en modo borrador. Por ejemplo, puede agregar la forma de pago adecuada o el uso correspondiente que el cliente podría necesitar.

After clicking on Confirm in the customer invoice, click on the Send button to process the invoice with the government. Make sure that the CFDI checkbox is marked.

CFDI Checkbox

After receiving the signed document back from the government, the Fiscal Folio field appears on the document, and the XML file appears both in the CFDI tab and attached in the chatter.

If an email address is configured on the customer contact record, marking the by Email and CFDI checkboxes sends both the XML and PDF files together.

To download the PDF file locally, click the Print button.

Truco

When clicking Update SAT, the SAT status field on the invoice will confirm if the XML file is Validated in the SAT.

On a testing environment, the message Not Found will always come up.

Notas de crédito

El tipo de documento de una factura es «I» (Ingreso), el de una nota de crédito es «E» (Egreso).

Lo único que cambia para el flujo estándar de las notas de crédito es que, como requisito del SAT, debe haber una relación entre una nota de crédito y una factura mediante el folio fiscal.

Debido a este requisito, el campo Origen del CFDI agrega esta relación mediante 01|, seguido del folio fiscal de la factura original.

Truco

Utilice el botón Agregar nota de crédito que se encuentra en la factura en lugar de crearla de forma manual, así el campo Origen del CFDI se agregará en automático.

Pagos

Política de pago

One addition of the Mexican localization is the Payment Policy field. According to the SAT documentation, there are two types of payments:

  • PUE (Pago en una Sola Exhibición/Payment in a Single Exhibition)

  • PPD (Pago en Parcialidades o Diferido/Payment in Installements or Deferred)

The difference lies in the Due Date or Términos de pago y planes de pago a plazos of the invoice.

To configure PUE invoices, navigate to Accounting ‣ Customers ‣ Invoices, and either select an invoice Due Date within the same month, or choose Payment terms that do not imply changing the due month (i.e., Immediate Payment, or 15 Days or 21 Days, as long as they fall within the current month).

Ejemplo de una factura con los requisitos de PUE.

Vaya a Contabilidad ‣ Clientes ‣ Facturas para configurar facturas para configurar facturas PPD. Allí, elija una factura con la fecha de vencimiento después del primer día del siguiente mes. Esto también aplica si sus condiciones de pago vencen el siguiente mes.

Ejemplo de una factura con los requisitos de PPD.
Flujo de pago

In both cases, the payment process in Odoo is the same, the main difference being payments related to PPD invoices, by law, need to be sent to the government as a document type «P» (Pago).

If a payment is related to a PUE invoice, it can be registered through the payment popup, and be associated with the corresponding invoice. To do so, navigate to Accounting ‣ Customers ‣ Invoices, and select an invoice. Then, click the Pay button to open the payment popup, set the Payment Way and any other fields, and click Create Payment.

While this process is the same for PPD invoices, the addition of creating an electronic document means some additional requirements are needed to correctly send the document to the SAT.

From a legal perspective, PPD invoices must include the specific Payment Way that the payment was received. Because of this, the Payment Way field cannot be set as To Define, thus the field will become invisible when selecting it.

Nota

  • If a bank account number is required, add it in the Accounting tab of a customer’s contact record.

  • Las forma de configuración exacta se encuentra en el Anexo 20 del SAT. Por lo general, la cuenta bancaria debe tener 10 o 18 dígitos para las transferencias y 16 para las tarjetas de crédito o débito.

If a fully-reconciled payment is related to an invoice with a Fiscal Folio, the Update Payments appears. 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.

Truco

While it is a bad fiscal practice, the PUE payments can also be sent to the government, however it is required to click Force CFDI in the CFDI tab for this.

Similar to an invoice or credit note, the PDF and XML can be sent to the final customer. To do so, click the (gear) icon to open the actions drop-down menu and select Send receipt by email.

Cancelar facturas

Es posible cancelar los documentos EDI que envió al SAT. Según la Reforma Fiscal 2022, desde el 1 de enero de 2022 existen dos requisitos para ello:

  • All cancellation requests require a cancellation reason.

  • After 24 hours from the invoice creation, the client must be asked to approve the cancellation. If there is no response within 72 hours, the cancellation is processed automatically.

Invoice cancellations can be made for one of the following reasons:

  • 01 - Invoice issued with errors (with related document)

  • 02 - Invoice issued with errors (no replacement)

  • 03 - The operation was not carried out

  • 04 - Nominative operation related to the global invoice

To initiate a cancellation, go to Accounting ‣ Customers ‣ Invoices, select the posted invoice to cancel, and click Request Cancel. Then, refer to the Cancellation reason 01 or Cancellation reasons 02, 03, and 04 sections, depending on the cancellation reason.

Truco

Alternatively, request a cancellation from the CFDI tab by clicking Cancel on the line item.

Nota

  • If a cancellation is requested on a locked period, the CFDI will be cancelled but not the accounting entry.

  • If the client rejects the cancellation, the invoice cancellation line item is removed from the CFDI tab.

Cancellation reason 01
  1. In the Request CFDI Cancellation pop-up window, select 01 - Invoice issued with errors (with related document) from the Reason field and click Create Replacement Invoice to create a new draft invoice. This new draft invoice replaces the previous invoice, along with the related CFDI.

  2. Confirm the draft and Send & Print the invoice.

  3. Return to the initial invoice (i.e., the invoice from which you first requested the cancellation). Notice the Substituted By field appears with a reference to the new replacement invoice.

  4. Click Request Cancel. In the Request CFDI Cancellation pop-up window, the 01 - Invoice issued with errors (with related document) option is automatically selected in the Reason field.

  5. Click Confirm.

The invoice cancellation is then generated with a reason line item in the CFDI tab.

Canceled invoice line item in the CFDI tab.

Nota

When using the 01 - Invoice issued with errors (with related document) cancellation reason, the 04| prefix appears in the Fiscal Folio field. This is an internal prefix used by Odoo to complete the cancellation and does not mean that the cancellation reason was 04 - Nominative operation related to the global invoice.

Cancellation reasons 02, 03, and 04

In the Request CFDI Cancellation pop-up window, select the desired cancellation Reason and Confirm the cancellation.

Upon doing so, the invoice cancellation is generated with a reason line item in the CFDI tab.

Nota

If the SAT Status goes back to Validated it could be due to one of these three reasons:

  • The invoice is labeled as No Cancelable in the SAT Website. due to the fact that it has a valid related document: Either another invoice linked with the CFDI Origin field or a Payment Complemement. If so, you need to cancel any other related document first.

  • The cancellation request is still being processed by the SAT. If so, wait a few minutes and try again.

  • The final customer needs to reject or accept the cancellation request in their Buzón Tributario. This can take up to 72 hours and, in case that the cancellation requests gets rejected, you will need to repeat the process again.

For the cancellation reasons 02, 03 and 04, the Create Replacement Invoice button is replaced by a Confirm button that requests the cancellation immediately.

Both the current State and Cancellation Reason can be found in the CFDI tab.

Old invoice with CFDI Origin.
Cancelaciones de pago

To cancel payment complements, go to the CFDI tab of the related invoice and click Cancel on the line of the payment complement.

Like with invoices, go to the payment and click Update SAT in order to change the SAT Status and Status to Cancelled.

Nota

Just like invoices, when creating a new payment complement, you can add the relation of the original document, by adding a 04| plus the fiscal folio in the CFDI Origin field. This action cancels the invoice and marks the Reason as 01 - Invoice issued with errors (with related document).

Facturación de casos de uso especial

Multidivisa

The Main Currency in Mexico is MXN. While this is mandatory for all Mexican companies, it is possible to send and receive invoices (and payments) in different currencies. To enable the use of multicurrency, navigate to the Accounting ‣ Configuration ‣ Currencies, and set [MX] Bank of Mexico as the Service in the Automatic Currency Rates section. Then, set the Interval field to the frequency you wish to update the exchange rates.

De esta manera, en el archivo XML del documento aparecerá el tipo de cambio correcto y el importe total tanto en la divisa extranjera como en MXN.

It is highly recommended to use separate bank accounts for each currency.

Nota

The only currencies that automatically update their exchange rate daily are: USD, EUR, GBP, JPY and CNY.

Descuentos

By law, electronic documents sent to the government cannot have negative lines, as this can trigger errors. Therefore, when using Gift Cards or Loyalty Programs, the subsequent negative lines will be translated in the XML as if they were regular Discounts.

In order to set this up, navigate to Sales ‣ Products ‣ Products and create a product Discounts, make sure that it has a valid Tax (usually IVA at 16%).

After this, create and sign the invoice via CFDI, and add the Discounts product at the bottom. In the XML the discount should be subtracted from the first invoice line available, Odoo will try to subtract from each line the total amount in order until all the discount has been applied.

Truco

A Discount and UNSPSC Product Category for each product variant related to Gift Cards or Loyalty Programs have to be created.

Anticipos

A common practice in Mexico is the usage of down payments. It’s usage primarily consists of cases where you receive a payment for a good or service where either the product or the price (or both) hasn’t been determinated at the moment.

The SAT allows two diferent ways to handle this process: both of them involve linking all invoices to each other with the CFDI Origin field.

Nota

For this process, the Sales app must be installed.

Configuración

First, navigate to Sales ‣ Products ‣ Products to create a product Anticipo and configure it. The Product Type must be Service, and use the UNSPSC Category 84111506 Servicios de facturación.

Después, vaya a Ventas ‣ Ajustes ‣ Facturación ‣ Anticipos y agregue Anticipo como producto predeterminado.

Method A

This method consists of creating a down payment invoice, creating a invoice for the total amount, and finally, creating a credit note for the total of the down payment.

First, create a sales order with the total amount, and create a down payment from it (either using a percentage or fixed amount). Then, sign the document via CFDI, and register the payment.

When the time comes for the customer to get the final invoice, create it again from the same sales order. In the Create Invoice popup, select Regular Invoice. Make sure to delete the line that contains the product Anticipo.

Truco

When using down payments with the Mexican localization, make sure that the Invoicing Policy of the products are Ordered quantities. Otherwise a customer credit note will be created.

Then, copy the Fiscal Folio from the down payment invoice, and paste it into the CDFI Origin of the final invoice, adding the prefix 07| before the value and sign the document via CFDI.

Finally, create a credit note for the first invoice. Copy the Fiscal Folio from the final invoice, and paste it in the CFDI Origin of the credit note, adding the prefix 07|. Then, sign the document via CFDI.

With this, all electronic documents are linked to each other. The final step is to fully pay the new invoice. At the bottom of the new invoice, you can find the credit note in the Outstanding credits - add it as payment. Finally, register the remaining amount with the Pay popup.

In the sales order, all three documents should appear as «In Payment».

Method B

Another, simpler way to fulfill SAT requirements involves creating only the down payment invoice, and a second invoice for the remnant. This method involves the fact that negative lines are treated as discounts.

For this, follow the same process as Method A, up until the creation of the final invoice. Do not delete the line that contains the Anticipo and instead rename the other products Description to include the text CFDI por remanente de un anticipo. Don’t forget to add the Fiscal Folio of the down payment invoice in the CDFI Origin of the final invoice, adding the prefix 07|.

Finally, sign the final invoice via CFDI.

XML reader

In certain occasions, such as when you are creating invoices in another software or in the SAT directly, you would want to upload the invoices in Odoo. The XML Reader allows you to retrieve the data from an XML file. To do this, navigate to Accounting ‣ Customers ‣ Invoices and, in the list view, click the Upload button to select any number of XML files, and draft invoices will be automatically created. This can work also by dragging the files from your computer and dropping them in the view.

The draft invoices will retrieve the Customer information (if it doesn’t exist, new ones will be created), the Product Lines (only if products with the same name already exist) and will calculate all taxes and additional fields exclusive to the Mexican Localization. The import information will appear in the chatter.

Advertencia

Depending on where the invoice was created, XML files could have different values from the total calculated in Odoo. Always double-check any document uploaded this way.

Customer Invoices created this way will be able to create payment complements and to be canceled at any time. If you use the Print button, the PDF document will have all the corresponding information.

This can be done for Vendor Bills too.

Truco

To retrieve the Fiscal Folio, drag and drop XML files for already created draft invoices.

CFDI al público

The Mexican government requires that any goods or services that are sold must be backed up by an invoice. If the customer does not require an invoice or has no RFC, a CFDI to Public has to be created also known as a «nominative» invoice.

A contact must be created and it must have a particular name. If the CFDI to Public checkbox in either a sales order or an invoice is checked, the final XML will override the data in the invoice contact and will add the following characteristics:

  • RFC: XAXX010101000 if it is a national customer or XEXX010101000 if it is a foreign customer

  • ZIP code: The same code of the company

  • Usage: S01 - Without Fiscal Effects

CFDI to Public Checkbox

Importante

If your contact Country is empty, the final invoice is considered as a CFDI to Public for national customers. A non-blocking warning will be displayed before signing the document.

If the final customer doesn’t share any details, create a generic Customer. The name cannot be PUBLICO EN GENERAL or an error will be triggered (it can be, for example, CLIENTE FINAL).

Factura global

If by the end of a certain period of time (that can vary from daily to bimonthly, depending of your company’s legal needs and preferences) and the customer still has sales that weren’t marked as regular invoices or individual CFDI to Public invoices, the SAT allows for the creation of a single invoice that can contain all operations, known as a global invoice.

Nota

For this process, the Sales app must be installed.

Sales flow

First, it is necessary to create a special Journal created in Accounting ‣ Configuration ‣ Journals with the purpose of keeping a separate sequence.

Then, make sure that all the sales orders that need to be signed have the following configurations:

  • CFDI to Public checkbox enabled

  • Invoice Status marked as To Invoice

After this, go to Sales ‣ To Invoice ‣ Orders to Invoice, select all relevant sales orders and press Create Invoices. Make sure to disable the Consolidated Billing checkbox and click Create Draft Invoice.

Odoo will redirect to a list of invoices. Select all of them and in the Actions drop-down menu select Post entries. Select all posted invoices again and go back to the Actions drop-down menu to select Create Global Invoice.

In the wizard, select the Periodicity indicated by a professional accountant and press Create. All invoices should be signed under the same XML file, with the same Fiscal Folio.

Truco

  • Click Show in the CFDI tab to display a list with all related invoices.

  • Click Cancel in the CFDI tab to cancel the global invoice in both the SAT and Odoo.

Nota

Global invoices created this way won’t have a PDF in them as their information is already within Odoo and is not to be seen by a customer.

Electronic accounting (reporting)

En Mexico, la contabilidad electrónica se refiere a la obligación de llevar los registros y asientos contables a través de medios electrónicos y de ingresar mensualmente la información contable en el sitio web del SAT.

Consta de tres archivos XML principales:

  1. The updated list of the chart of accounts that is currently in use

  2. A monthly trial balance, plus a closing entry report, also known as: Trial Balance Month 13

  3. An export of the journal entries in the general ledger (optional except in the case of a compulsory audit)

El archivo XML que se genera cumple con los requisitos del Anexo Técnico de Contabilidad Electrónica 1.3.

In addition to this, it is possible to generate the DIOT: a report of vendors” journal entries that involve IVA taxes that can be exported in a TXT file.

Nota

In order to use these reports, the following modules must be installed:

  • Odoo Mexican Localization Reports l10n_mx_reports

  • Mexico - Month 13 Trial Balance l10n_mx_reports_closing

  • Odoo Mexican XML Polizas Export l10n_mx_xml_polizas

The chart of accounts and the Trial Balance Month 13 reports can be found in Accounting ‣ Reporting ‣ Trial Balance. The DIOT report can be found in Accounting ‣ Reporting ‣ Tax Report.

Importante

Las características y obligaciones específicas de los informes que envíe pueden cambiar de acuerdo a su régimen fiscal. Consulte a su contador antes de enviar cualquier documento al gobierno.

Plan contable

The chart of accounts in Mexico follows a specific pattern based on SAT’s” Código agrupador de cuentas.

It is possible to create any account, as long as it respects SAT’s encoding group: the pattern is NNN.YY.ZZ or NNN.YY.ZZZ.

Example

Algunos ejemplos son 102.01.99 o 401.01.001.

When a new account is created in Accounting ‣ Configuration ‣ Chart of Accounts, with the SAT encoding group pattern, the correct grouping code appears in Tags, and the account appears in the COA report.

Once all accounts are created, make sure the correct Tags are added as these mark the nature of the account.

Nota

It is not advised use any pattern that ends a section with a 0 (such as 100.01.01, 301.00.003 or 604.77.00). This triggers errors in the report. By default Odoo will mark the accounts as yellow if the numbering will cause issue later on, this is to prevent reports from providing inaccurate data.

Once everything is set up, go to Accounting ‣ Reporting ‣ Trial Balance, and click the COA SAT (XML) button to generate an XML file containing all of the accounts. This XML file is ready to upload to the SAT website.

Balance de comprobación

La balanza de comprobación es un informe del balance inicial, el crédito y el balance total de sus cuentas que se genera si agrega correctamente su grupo de codificación.

To generate an XML file of the trial balance, go to Accounting ‣ Reporting ‣ Trial Balance, select the date, and click the (action menu), then select SAT (XML).

Informe de la comprobación del balance.

Nota

Odoo no genera la Balanza de Comprobación Complementaria.

Month 13

An additional report is the Month 13: a closing balance sheet that shows any adjustments or movements made in the accounting to close the year.

To generate this XML document, navigate to Accounting ‣ Accounting ‣ Journal Entries, and create a new document. Here, add all amounts to modify, and balance the debit and/or credit of each one.

After this is done, go to the Other Info tab and check the Month 13 Closing field. If needed, go to Accounting ‣ Reporting ‣ Trial Balance and select the date Month 13, where it is possible to see the the total amount of the year, plus all the additions of the journal entry. To generate the XML file, click the (action menu), then select SAT (XML).

Libro mayor

By law, all transactions in Mexico must be recorded digitally. Since Odoo automatically creates all the underlying journal entries of all invoices and payments, simply exporting the general ledger complies with SAT’s audits and/or tax refunds.

Truco

The report can be filtered by period or by journal, depending on the need.

To create the XML, go to Accounting ‣ Reporting ‣ General Ledger, click (action menu), then click XML (Polizas). Then, select among four Export types:

  • Auditoría de impuestos

  • Certificación de auditoría

  • Devolución de bienes

  • Compensación

For Tax audit or Audit certification, add the Order Number provided by the SAT. For Return of goods or Compensation, add the Process Number, also provided by the SAT.

Nota

To see this report without sending it, use ABC6987654/99 for the Order Number or AB123451234512 for the Process Number.

Informe DIOT

The DIOT (Declaración Informativa de Operaciones con Terceros / Informative Declaration of Operations with Third Parties) is an additional obligation with the SAT, where the current status of creditable and non-creditable payments, withholdings, import taxes, and refunds of VAT from your vendor bills are provided to the SAT.

Nota

Since July 2025 the new 2025 version of the report is available.

Unlike other reports, the DIOT is uploaded to a software provided by the SAT that contains the A-29 form. In Odoo, you can download the records of your transactions as a TXT file that can be uploaded to the form, avoiding direct capture of this data.

El archivo de transacciones contiene el importe total de sus pagos registrados en las facturas de proveedor desglosados en los tipos correspondientes de IVA. Los campos NIIF y País son obligatorios para todos los proveedores.

To download the DIOT report as a TXT file, go to Accounting ‣ Reports ‣ Tax Return. Select the desired month, click (action menu), and select DIOT (TXT).

DIOT (TXT) download button.

Importante

It is required to fill in the Type of Operation field in the Accounting tab of each vendor to prevent validation errors. Make sure that foreign customers have their Country set.

Información de la DIOT en el contacto del proveedor.

Selecting 87 - Global Operations will cause the final TXT file to merge all vendors that are part of the global operations under one generic VAT: XAXX010101000.

Comercio exterior

La factura de comercio exterior es un complemento para una factura regular que agrega algunos valores al XML y el PDF para las facturas de un cliente extranjero de acuerdo con los reglamentos del SAT. Entre estos valores se encuentran:

  • La dirección específica del destinatario y el remitente.

  • La adición de una fracción arancelaria que identifica el tipo de producto.

  • The correct Incoterms (International Commercial Terms)

  • And more, such as the certificate of origin and special units of measure

Esto permite identificar de forma correcta a los exportadores e importadores, además de ampliar la descripción de la mercancía vendida.

Since January 1, 2018, external trade is a requirement for taxpayers who carry export operations of type A1. While the current CFDI is 4.0, the external trade is currently on version 2.0.

Nota

In order to use this feature, the EDI for Mexico (Advanced Features) l10n_mx_edi_extended module must be installed.

Importante

Asegúrese de que su negocio necesita utilizar esta función antes de instalarlos. Le recomendamos que primero consulte a su contador antes de instalar cualquier modulo.

Configuración

Contactos

To configure your company contact for external trade, navigate to Accounting ‣ Customers ‣ Customers, remove the default Customer Invoices filter, and select your Company name. While the CFDI 4.0 requirements require adding a valid ZIP code in the company contact record, the external trade complement adds the requirement that the City and the State must also be valid. All three fields must coincide with the Official SAT Catalog for Carta Porte, or it will produce an error.

Advertencia

Add the City and State in the company’s contact record, not in the company record itself.

On the contact record, the optional fields Locality and Colony Code can also be filled. These two fields also have to coincide with the data in the SAT.

Para configurar los datos de contacto de un cliente receptor extranjero, vaya a Contabilidad ‣ Clientes‣ Clientes y seleccione el contacto del cliente extranjero. Este contacto debe tener los siguientes campos completos para evitar errores:

  1. La dirección completa de la empresa, con un código postal válido y el país extranjero.

  2. The foreign RFC (tax identification number), in the correct format (for example: Colombia 123456789-1)

  3. In the Sales & Purchase tab, to activate the Needs external trade? checkbox.

Importante

Do not enable the No Tax Breakdown option for External Trade customers. Selecting this option hides mandatory fields that are required for external trade contact configuration.

Nota

En los archivos XML y PDF resultantes, el NIF se sustituye de manera automática por un NIF genérico para transacciones al extranjero: XEXX010101000.

Productos

All products involved with external trade have four additional fields that are required, two of which are exclusive to external trade.

  1. The Reference of the product must be set in the General Information tab.

  2. The Weight of the product in the Inventory tab must be more than 0.

  3. The correct Tariff Fraction of the product must be set in the Accounting tab for external trade.

  4. The UMT Aduana in the Accounting tab must be set and correspond to the Tariff Fraction for external trade.

Campos necesarios para los productos de comercio exterior.

Truco

  • Si el código de UdM de la fracción arancelaria es 01, la UMT Aduana correcta es kg.

  • Si el código de UdM de la fracción arancelaria es 06, la UMT Aduana correcta es Unidades.

Flujo de facturación

Before creating an invoice, it is important to take into account that external trade invoices require converting product prices into a foreign currency such as USD. Therefore, multicurrency must be enabled with the foreign currency activated in the Currencies section. The correct Service to run is [MX] Bank of Mexico. To convert product prices, create a pricelist in the foreign currency.

Then, with the correct exchange rate set up in Accounting ‣ Settings ‣ Currency, set the Incoterm and the optional Certificate Source fields in the invoice’s Other Info tab.

Finally, confirm the invoice with the same process as a regular invoice, and click the Send button to sign it via CFDI.

Point of sale

The Point of sale adaptation of the Mexican Localization enables the creation of invoices that comply with the SAT requirements directly in the POS session, with the added benefit of creating receipt tickets that allow self-invoicing in a special portal and creating global invoices.

Point of sale flow

Other than the standard Point of Sale configuration, the only requirement for the Mexican localization is the additional fact that each payment method needs to be configured with a correct Payment Way.

Truco

By default Odoo creates preconfigured payment methods for cash, credit card, and debit card.

While selling on the Point of Sale, click the Customer button to either create or select a customer. Here it is possible to review customer invoicing information (such as the RFC or Fiscal Regime) and even modify it directly inside the session.

After selecting a customer, tick the Invoice checkbox. This opens a menu to select the Usage and to define if it is an invoice to the public. Click confirm, select the payment method, and then click validate to complete the order. The PDF is then downloaded and it is possible to send the invoice via mail to the final customer alongside the receipt.

Truco

To create invoices from orders, go to the Orders menu, select the order, click Load Order, and tick the Invoice checkbox. This opens the same menu for the Usage and CFDI to Public.

Invoice Configuration for Point of Sale.

To sign a credit note automatically, tick the Invoice checkbox when processing a refund.

Nota

Credit notes for returned products will contain the relation type 03 - Devolución de mercancía sobre facturas o traslados previos.

Importante

  • In the Mexican localization, positive and negative lines in a POS session cannot be mixed.

  • If a SAT validation error occurs customer will get a Pro-Forma invoice instead.

Self-invoicing portal

If the final customer is not sure if they want to have their invoice generated at the exact moment of the sale, it is possible to give them the option of creating a receipt with either a QR code or a URL. To do so, follow these steps:

  1. Go to Point of Sale ‣ Configuration.

  2. Select the Point of Sale.

  3. Scroll to the Bills & Receipts section.

  4. Enable Self-service invoicing.

  5. Set the Print field to QR code, URL, or QR code + URL.

Customers who scan this QR code or follow the URL will access to a menu where they can add their fiscal information, including the Usage and Fiscal Regime once they enter the five digit code that is also provided on the receipt.

Ver también

Recibos y facturas

Factura global

As with regular sales orders, global invoices can also be created from a POS session.

For this, make sure not to select a customer or the invoice option in the payment menu and go to Point of Sale ‣ Orders ‣ Orders. There, select all the orders to invoice, click Actions and select Create Global Invoice.

Like with sales orders, choose the correct Periodicity and press Create.

This attaches an XML file to each of the selected orders. The XML files can be downloaded by going to the CFDI tab. If needed, it is possible to cancel the invoice from the same tab.

If eventually any of the orders that are part of the global invoice need to be addressed to a customer, it is still possible to send an invoice by entering a new POS session, clicking the (drop-down menu), then click Orders. Change the All active orders filter to Paid, select the order, and click the Invoice button.

Nota

Global invoices, just as regular invoices, can only be grouped by physical address. That is determined by the address set on the POS invoice journal, so when attempting to invoice two addresses a warning will come up to warn the user of the error.

Comercio electrónico

The eCommerce adaptation of the Mexican Localization provides and extra step to create invoices that comply with the SAT requirements on eCommerce by retrieving the customer data after the Checkout and even allowing for the signature of automatic invoices after the payment is processed, as well as sending customers the files via email and granting them access to retrieve their PDF & XML files from their own customer portal.

eCommerce flow

During the regular checkout process, a new Invoicing Info step appears, where it is possible to request an invoice or not. If No is selected, a CFDI to Public is created,. If Yes is selected, the RFC, Fiscal Regime, and Usage are required in order to get all information in the sales order, where its status will change to To Invoice.

Importante

Make sure to add a UNSPSC code to the shipping product.

If you enable the Automatic Invoicing in Settings ‣ Website ‣ Invoicing, the electronic document will be signed automatically.

Suscripciones

While handling subscriptions, all the sales fields are used to create the recurrent invoices. These are automatically signed and sent via email with the PDF and XML attached with no additional manual actions required.

Inventario

Números de pedimento

A customs declaration (Pedimento Aduanero) is a fiscal document that certifies that all contributions to the fiscal entity (the SAT) have been paid for, including the import/export of goods.

According to the Annex 20 of CFDI 4.0, in documents where the invoiced goods come from a first-hand import operation, the Customs Number field, needs to be added to all lines of products involved with the operation.

Nota

To do so, the Odoo Mexico Localization for Stock/Landing l10n_mx_edi_landing module must be installed, in addition to the Inventory, Purchase, and Sales apps.

Importante

No debe confundir esta función con comercio externo. Los números de pedimento están directamente relacionados con la importación de bienes, mientras que el comercio externo está relacionado con las exportaciones. Consulte con su contador primero si necesita esta función antes de hacer cualquier modificación.

Configuración

In order to track the correct customs number for a specific invoice, Odoo uses landed costs. Go to Inventory ‣ Configuration ‣ Settings, and in the Valuation section, make sure that Landed Costs is activated.

Begin by creating a service-type product called, Pedimento. In the Purchase tab, activate Is a Landed Cost, and select a Default Split Method.

Then, configure the goods-type products that hold the customs numbers. To do so, create the products, and make sure the Product Category has the following configuration:

  • Método de coste: debe ser FIFO o AVCO

  • Valoración del inventario: Automático

  • Stock Valuation Account: 115.01.01 Inventory

  • Diario de las existencias: Valoración del inventario

  • Stock Input Account: 115.05.01 Goods in transit

  • Stock Output Account: 115.05.01 Goods in transit

Nota

Setting the Inventory Valuation to Automated requires first enabling the feature. Go to Accounting ‣ Configuration ‣ Settings, and in the Stock Valuation section, enable Automatic Accounting.

Configuración general de los productos almacenables. Configuración de la categoría de los productos almacenables.

Flujo de compra y ventas

After configuring the product, follow the standard purchase flow.

Create a purchase order from Purchase ‣ Orders ‣ Purchase Order. Then, confirm the order to display a Receipt smart button. Click on the Receipt smart button and Validate the receipt.

Go to Inventory ‣ Operations ‣ Landed Costs, and create a new record. In the Transfer, add the receipt that was just validated, add the Customs number and in the Additional Costs tab, add the Pedimento product.

Optionally, it is possible to add a cost amount. After this, Validate the landed cost. Once Posted, all products related to that receipt have the customs number assigned.

Advertencia

The Pedimento Number field is not editable once it is set, so be careful when associating the correct number with the transfer(s).

Número de pedimento en costes de destino en el registro de inventario.

Next, create a sales order and confirm it. Click on the Delivery smart button that appears, and Validate the delivery order.

Finally, create an invoice from the sales order, and confirm it. The invoice line related to the product has a customs number on it. This number matches the customs number added in the landed cost record created earlier.

Número de pedimento en un producto de una orden de venta confirmada.

Guía de entrega

Una Carta Porte es una guía de embarque, es decir, un documento que indica el tipo, cantidad y destino de las mercancías que se transportan.

On July 17th, 2024, version 3.1 of this CFDI was implemented for all transportation providers, intermediaries, and owners of goods. Odoo is able to generate a document type «T» (Traslado), which, unlike other documents, is created in a delivery order instead of an invoice or payment.

Odoo puede crear archivos XML y PDF con (o sin) transporte terrestre y puede procesar materiales etiquetados como Peligrosos.

Nota

In order to use this feature, the Mexico - Electronic Delivery Guide l10n_mx_edi_stock module must be installed.

Additionally, it is necessary to have the Inventory and Sales apps installed.

Importante

Odoo no es compatible con la Carta Porte tipo «I» (Ingreso), transporte marítimo o aéreo. Consulte con su contador primero si necesita esta función antes de hacer cualquier modificación.

Configuración

Odoo manages two different types of CFDI type «T». Both can be created from either incoming shipments or delivery orders.

  • No Federal Highways is used when the Distance to Destination is less than 30 km.

  • Federal Transport is used when the Distance to Destination exceeds 30 km.

Other than the standard requirements of regular invoicing (the RFC of the customer, the UNSPSC code, etc.), if you are using No Federal Highways, no external configuration is needed.

For Federal Transport, several configurations have to be added to contacts, vehicle setups, and products. Those configurations are then included in the XML and PDF files.

Contactos y vehículos

Like the external trade feature, the Address in both the company and the final customer must be complete. The ZIP code, City, and State must coincide with the Official SAT Catalog for Carta Porte.

Truco

El campo entidad federativa es opcional para ambas direcciones.

Importante

The origin address used for the delivery guide is set in Inventory ‣ Configuration ‣ Warehouses. While this is set as the company address by default, you can change it to your correct warehouse address.

Another addition to this feature is the Vehicle Setups menu found in Inventory ‣ Settings ‣ Vehicle Setups. This menu lets you add all the information related to the vehicle used for the delivery order.

Es obligatorio que complete todos los campos para crear una guía de entrega completa.

Truco

The fields, Vehicle Plate Number and Number Plate, must contain between 5 and 7 characters.

In the Intermediaries section, add the operator of the vehicle. The only mandatory fields for this contact are the VAT and Operator Licence.

Configuración de la guía de entrega del producto.
Productos

Como con cualquier otra factura normal, todos los productos deben tener una categoría UNSPSC. Además, hay dos ajustes adicionales para los productos que se incluyen en las guías de entrega:

  • El Tipo de producto debe estar establecido como Producto almacenable para los movimientos de existencias que se creen.

  • In the Inventory tab, the field Weight must be more than 0.

Advertencia

Creating a delivery guide of a product with the value 0 will trigger an error. As the Weight has been already stored in the delivery order, it is needed to return the products and create the delivery order (and delivery guide) again with the correct amounts.

Flujo de ventas e inventario

To create a delivery guide, first, first create and confirm a sales order from Sales ‣ Sales Order. Click the Delivery smart button that is generated, and Validate the transfer.

After the status is set to Done, you can edit the transfer, and select the Transport Type in the Additional Info tab.

If using the No Federal Highways Transport Type, save the transfer, and then click Generate Delivery Guide. The resulting XML can be found in the chatter.

Nota

Other than the UNSPSC on all products, delivery guides that use No Federal Highways do not require any special configuration to be sent to the government.

If using the Federal Transport Transport Type, the tab MX EDI appears. There, enter a value in Distance to Destination (KM) greater than 0, and select the Vehicle Setup used for this delivery.

Finally, add a Gross Vehicle Weight and click Generate Delivery Guide.

Truco

Delivery Guides can also be created from Receipts, either from the Inventory app or by the standard flow of the Purchase app.

Materiales peligrosos

Algunos valores dentro de las categorías UNSPSC se consideran peligrosos de acuerdo al catálogo oficial del SAT. Estas categorías necesitan consideraciones adicionales al momento de crear una guía de envío tipo Transporte por carretera federal.

First, select the product from Inventory ‣ Products ‣ Products. Then, in the Accounting tab, fill the Hazardous Material Designation Code and Hazardous Packaging fields with the correct code from the SAT catalog.

Campos necesarios para la guía de entrega para materiales peligrosos.

Importante

There exists the possibility that a UNSPSC Category may or may not be a dangerous hazard (for example 01010101). If it is not dangerous, enter 0 in the Hazardous Material Designation Code field.

In Inventory ‣ Settings ‣ Vehicle Setup, complete the Environment Insurer and Environment Insurance Policy well. After this, continue with the regular process to create a delivery guide.

Imports and Exports

If your Carta Porte is for international operations (for exports), some additional fields need to be taken into account.

First, make sure that all relevant Products have the following configuration:

  • UNSPSC Category cannot be 01010101 Does not exist in the catalog.

  • Tariff Fraction and UMT Aduana must be set, similar to the external trade flow.

  • Material Type must be set.

Then, when creating a Delivery Guide from a delivery or receipt, fill the following fields:

  • Customs Regimes

  • Customs Document Type

  • Customs Document Identification

Then, when creating a Delivery Guide for a receipt where the Customs Document Type is Pedimento, two new fields appear: Pedimento Number and Importer.

Truco

The field Pedimento Number should follow the pattern xx xx xxxx xxxxxxx. For example, 15 48 3009 0001235.