Repository
OCA/l10n-mexico · module folder · Try on Runboat
Module version
Category
Localization
Folder size
0.2 MB
License
GPL-3
Application
No
Auto-installable
No
Website
https://github.com/OCA/l10n-mexico
Last tracking update
2026-08-15 05:29:24
Authors
Odoo Community Association (OCA), Alexis López Zubieta <alexis.lopez@augetec.com> (Auge TEC)
Maintainers
Odoo Community Association (OCA), Alexis López Zubieta <alexis.lopez@augetec.com> (Auge TEC)
Committers
Maxime Chambreuil, OCA-git-bot, oca-ci
Odoo dependencies
Python dependencies
satcfdi
System dependencies
None
Required by
None
Description
This module adds Mexican foreign trade (COMEX) compliance on top of CFDI invoicing.

**Features**

- Pedimento management linked to inventory lots (import path)
- Tariff code (fracción arancelaria) on products
- Import details on invoice lines for Mexican companies
- Pedimento numbers in CFDI concept ``InformacionAduanera`` / ``NumerosPedimento``
- Pedimento propagation from landed costs to lots
- **Complemento Comercio Exterior 2.0** on customer invoices:
  ``Exportacion=02`` plus satcfdi ``cce20.ComercioExterior`` (Emisor/Receptor/
  Destinatario domicilios, mercancías, TipoCambioUSD, TotalUSD)
- Reuses the standard invoice **Incoterm** field (``invoice_incoterm_id`` /
  ``account.incoterms``) for SAT ``c_INCOTERM``; no duplicate Incoterm field

**PAC notes**

- Stamp / XML-issue PACs can stamp sealed CFDIs that include CCE.
- Facturama Multiemisor cannot map CCE; ``l10n_mx_cfdi`` switches to
  FacturamaWeb when the complement is present.

Code Analysis

Views touched (6)
XML IDNameModelTypeStatus
product_template_form_view_cfdi_comex_inherit product.template.form.view.cfdi.comex.inherit product.template form Inherits l10n_mx_cfdi.product_template_form_view_inherit
view_l10n_mx_cfdi_pedimento_list l10n_mx_cfdi.pedimento.list l10n_mx_cfdi.pedimento list New
view_l10n_mx_cfdi_pedimentoento_form l10n_mx_cfdi.pedimento.form l10n_mx_cfdi.pedimento form New
view_move_form_comex_cce account.move.form.cfdi.comex.cce account.move form Inherits account.view_move_form
view_stock_landed_cost_form_pedimento stock.landed.cost.form.pedimento stock.landed.cost form Inherits stock_landed_costs.view_stock_landed_cost_form
view_stock_lot_form_pedimento stock.lot.form.pedimento stock.lot form Inherits stock.view_production_lot_form
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (6)

New fields (10)
  • l10n_mx_cfdi_cce_certificado_origen Selection
    default='0' selection=[('0', 'Does not act as certificate of origin'), ('1', 'Acts as certificate of origin')] string='Certificado de origen'
  • l10n_mx_cfdi_cce_clave_pedimento Char
    default='A1' help='SAT c_ClavePedimento code (e.g. A1 for definitive export).' string='Clave de pedimento'
  • l10n_mx_cfdi_cce_destinatario_id Many2one → res.partner
    help='Optional goods recipient when different from the CFDI receptor. Address is taken from the partner.' string='Destinatario CCE' args: 'res.partner'
  • l10n_mx_cfdi_cce_enabled Boolean
    help='Enable Complemento Comercio Exterior 2.0 on this invoice. Sets Exportacion=02 and attaches the CCE complement.' string='Comercio Exterior (CCE)'
  • l10n_mx_cfdi_cce_motivo_traslado Char
    help='SAT c_MotivoTraslado when applicable.' string='Motivo de traslado'
  • l10n_mx_cfdi_cce_num_certificado_origen Char
    string='Número certificado de origen'
  • l10n_mx_cfdi_cce_numero_exportador_confiable Char
    string='Número exportador confiable'
  • l10n_mx_cfdi_cce_observaciones Char
    string='Observaciones CCE'
  • l10n_mx_cfdi_cce_tipo_cambio_usd Float
    digits=(16, 6) help='MXN per 1 USD (SAT TipoCambioUSD). Prefer Banxico rate for the invoice date.' string='Tipo cambio USD'
  • l10n_mx_cfdi_cce_total_usd Float
    compute='_compute_l10n_mx_cfdi_cce_total_usd' digits=(16, 2) readonly=False store=True string='Total USD'
Public methods (0)

No public methods.

New fields (8)
  • l10n_mx_cfdi_cce_cantidad_aduana Float
    digits=(16, 3) help='Customs quantity (CCE CantidadAduana). Defaults to invoice quantity.' string='Cantidad aduana'
  • l10n_mx_cfdi_cce_no_identificacion Char
    help='CCE NoIdentificacion. Defaults to the product Internal Reference when empty.' string='No identificación CCE'
  • l10n_mx_cfdi_cce_unidad_aduana Char
    default='01' help='SAT c_UnidadAduana code (e.g. 01 = Kg, 06 = Piece).' size=2 string='Unidad aduana'
  • l10n_mx_cfdi_cce_valor_dolares Float
    digits=(16, 2) help='Total value in USD for this line (CCE ValorDolares).' string='Valor dólares'
  • l10n_mx_cfdi_cce_valor_unitario_aduana Float
    digits=(16, 6) help='Unit customs value in USD (CCE ValorUnitarioAduana).' string='Valor unitario aduana'
  • l10n_mx_cfdi_pedimento_ids Many2many → l10n_mx_cfdi.pedimento
    comodel_name='l10n_mx_cfdi.pedimento' compute='_compute_l10n_mx_cfdi_pedimento_ids' help='Pedimentos relacionados con esta línea de factura para cumplimiento de regulaciones mexicanas.' string='Pedimentos'
  • l10n_mx_cfid_import_details Text
    compute='_compute_l10n_mx_cfid_import_details' help='Import details for Mexican regulations compliance' string='Import details'
  • l10n_mx_cfid_import_details_required Boolean
    compute='_compute_l10n_mx_cfid_import_details_required' default=False string='Import details required'
Public methods (1)
  • create(self, vals)
    @api.model

New fields (5)
  • customs_id Many2one → l10n_mx_catalogs.c_aduana
    required=True string='Aduana' args: 'l10n_mx_catalogs.c_aduana'
  • date Date
    default=fields.Date.context_today required=True string='Fecha'
  • lot_ids One2many → stock.lot
    string='Lotes' args: 'stock.lot', 'l10n_mx_cfdi_pedimento_id'
  • name Char
    compute='_compute_name' store=True string='Nombre'
  • number Char
    required=True string='Número de Pedimento'
Public methods (0)

No public methods.

New fields (1)
  • l10n_mx_cfdi_tariff_code Many2one → l10n_mx_catalogs.c_fraccion
    help='Tariff code for product template according to the SAT catalog for Mexican regulations compliance.' string='Tariff Code' args: 'l10n_mx_catalogs.c_fraccion'
Public methods (0)

No public methods.

New fields (1)
  • l10n_mx_cfdi_pedimento_id Many2one → l10n_mx_cfdi.pedimento
    help='Pedimento que se copiará a los lotes de las recepciones relacionadas.' string='Pedimento' args: 'l10n_mx_cfdi.pedimento'
Public methods (1)
  • button_validate(self)

New fields (1)
  • l10n_mx_cfdi_pedimento_id Many2one → l10n_mx_cfdi.pedimento
    help='Pedimento relacionado con este lote.' string='Pedimento' tracking=True args: 'l10n_mx_cfdi.pedimento'
Public methods (0)

No public methods.