TIP: You can type at any time to perform a new search.
Mexico - CFDI Generation
l10n_mx_cfdi · OCA/l10n-mexico
- Repository
- OCA/l10n-mexico · module folder · Try on Runboat
- Module version
- Category
- Accounting
- Folder size
- 0.51 MB
- License
- LGPL-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), Gray Matter Logic, Auge TEC
- Maintainers
- Odoo Community Association (OCA), Gray Matter Logic, Auge TEC
- Committers
- Maxime Chambreuil, OCA-git-bot, oca-ci
- Odoo dependencies
- Python dependencies
- satcfdi
- System dependencies
- None
- Required by
- l10n_mx_cfdi_account
- Description
This module provides the configuration used by electronic invoicing for Mexico: - Multi-PAC integration via satcfdi (Finkok, Diverza, Prodigia, Comercio Digital, SW Sapien, MYSuite, Facturama). - Local CSD management for CFDI sealing when the PAC uses ``stamp()``. - Facturama Multiemisor CSD upload on issuer registration (required before ``issue()``). - Management of different series and CFDI issuers for the same company. **CFDI × PAC capability matrix** | Flow | Finkok | Diverza | Prodigia | Com. Digital | SW Sapien | MYSuite | Facturama | |------|:------:|:-------:|:--------:|:------------:|:---------:|:-------:|:---------:| | Path | issue() | issue() | stamp() | stamp() | issue() | stamp() | issue() Multiemisor / Web | | Ingreso (I) | Yes | Yes | Yes | Yes | Yes | Yes | Yes | | Egreso (E) | Conditional | Conditional | Conditional | Conditional | Conditional | Conditional | Conditional | | Pago (P) | Conditional | Conditional | Conditional | Conditional | Conditional | Conditional | Conditional | | Traslado / Carta Porte | Yes | Yes | Yes | Yes | Yes | Yes | Yes | | Pedimentos on concepts | Yes | Yes | Yes | Yes | Yes | Yes | Yes | | Full CCE complement | Conditional | Conditional | Conditional | Conditional | Conditional | Conditional | Conditional | | Cancel (API) | Conditional | Yes | No | No | Yes | No | Yes | | Cancel with acuse | Conditional | Unknown | No | No | Unknown | No | Conditional | **Legend** - **Yes**: supported end-to-end via this module + satcfdi for that PAC. - **Conditional**: - Egreso: requires a fully reconciled refund (``amount_residual == 0``). - Pago: auto-stamp only for reconciled inbound payments on **PPD** invoices; manual stamping needs valid payment CFDI data. - Finkok cancel: requires company FIEL via ``l10n_mx_sat`` (signer). - Facturama cancel acuse: may be empty; the module shows status/message when the PAC omits the acuse. - Full CCE: built by ``l10n_mx_cfdi_comex`` (``Exportacion=02`` + ``cce20.ComercioExterior``). Stamp PACs (Prodigia, Comercio Digital, MYSuite) and XML-issue PACs (Finkok, Diverza, SW) can stamp sealed XML with CCE (live PAC acceptance not exhaustively retested here). Facturama Multiemisor does **not** support CCE; when CCE is present the module switches to FacturamaWeb (same user/password; account-profile CSD). - **No**: - Cancel API is not exposed in satcfdi for Prodigia, Comercio Digital, and MYSuite (``supports_cancel=False``). - **Unknown**: acuse availability depends on the PAC response (Diverza / SW Sapien). - **Path**: Finkok, Diverza, SW Sapien, and Facturama use ``issue()``; Prodigia, Comercio Digital, and MYSuite use local CSD seal + ``stamp()``. Facturama is Multiemisor by default (**Registrar** uploads the CSD); FacturamaWeb is used automatically for Comercio Exterior. - Pedimentos on concepts are not the full CCE complement; the Facturama adapter maps ``NumerosPedimento``.
Code Analysis ⓘ
Views touched (17)
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
action_l10n_mx_cfdi_service_form |
CFDI Service Settings | l10n_mx_cfdi.cfdi_service | form | New |
cfdi_id_data |
cfdi_id_data | ir.ui.view | qweb | New |
cfdi_issuer_data |
cfdi_issuer_data | ir.ui.view | qweb | New |
cfdi_payment_data |
cfdi_payment_data | ir.ui.view | qweb | New |
cfdi_receiver_data |
cfdi_receiver_data | ir.ui.view | qweb | New |
cfdi_related_documents |
cfdi_related_documents | ir.ui.view | qweb | New |
cfdi_signature_data |
cfdi_signature_data | ir.ui.view | qweb | New |
default_issuer_data |
default_issuer_data | ir.ui.view | qweb | New |
default_receiver_data |
default_receiver_data | ir.ui.view | qweb | New |
l10n_mx_cfdi_series_form_view |
Serie CFDI | l10n_mx_cfdi.series | form | New |
l10n_mx_cfdi_series_list_view |
Serie CFDI | l10n_mx_cfdi.series | list | New |
product_template_form_view_inherit |
Product Template: CFDI code and measurement unit fields | product.template | form | Inherits product.product_template_form_view |
view_cfdi_issuer |
CFDI Issuer | l10n_mx_cfdi.issuer | form | New |
view_l10n_mx_cfdi_document_form |
CFDI Form View | l10n_mx_cfdi.document | form | New |
view_l10n_mx_cfdi_document_list |
CFDI List View | l10n_mx_cfdi.document | list | New |
view_l10n_mx_cfdi_document_search |
CFDI Search View | l10n_mx_cfdi.document | search | New |
view_partner_form_inherit |
Partner: tax regime field | res.partner | form | Inherits base.view_partner_form |
HTTP endpoints (0)
No HTTP endpoints found for this module.
Models touched (9)
New fields (15)
-
company_idsMany2many → res.companydefault=<expr>string='Companies' args: 'res.company' -
nameCharrequired=True -
pac_client_idChargroups='base.group_system'string='PAC Client ID' -
pac_contratoChargroups='base.group_system'string='PAC Contract' -
pac_countryChardefault='MX'groups='base.group_system'string='PAC Country' -
pac_requestorChargroups='base.group_system'string='PAC Requestor' -
pac_rfcChargroups='base.group_system'string='PAC RFC' -
pac_tokenChargroups='base.group_system'string='PAC Token' -
passwordChargroups='base.group_system' -
providerSelectiondefault='finkok'groups='base.group_system'required=Trueselection=<expr> -
sandbox_modeBooleandefault=Falsegroups='base.group_system' -
stamps_availableIntegerreadonly=Truestring='Stamps available' -
supports_cancelBooleancompute='_compute_pac_capabilities' -
supports_issueBooleancompute='_compute_pac_capabilities' -
userChargroups='base.group_system'
-
cancel_cfdi(self, cfdi_or_xml, reason, uuid_replacement=None, issuer=None, document_id=None) -
check_cfdi_status(self, uuid, issuer_rfc, receiver_rfc, amount_total)Query CFDI status through the PAC when supported; otherwise unknown. -
create_cfdi(self, cfdi, issuer=None)Seal/stamp a CFDI via the configured PAC and return a normalized result. Prefers ``pac.issue()`` when the provider supports it; otherwise signs locally with the issuer CSD and calls ``pac.stamp()``. -
delete_issuer_csd(self, issuer)Remove issuer CSD from PACs that store it remotely (Facturama). -
get_cancellation_request_proof(self, tracking_id: str)Return cancellation acknowledgment PDF/XML when available via recover. -
get_cfdi_pdf(self, tracking_id: str)Try to recover PDF from the PAC when available. -
get_cfdi_xml(self, tracking_id: str) -
upload_issuer_csd(self, issuer)Upload issuer CSD to PACs that require remote registration (Facturama). -
validate_csd(self, issuer)Validate that the issuer CSD can be loaded (local registration).
New fields (7)
-
currency_idMany2one → res.currencydefault=<expr>readonly=Truerequired=Truestring='Moneda' args: 'res.currency' -
partner_idMany2one → res.partnerdefault=<expr>ondelete='restrict'readonly=Truerequired=Truestring='Contacto' args: 'res.partner' -
service_idMany2one → l10n_mx_cfdi.cfdi_serviceondelete='cascade'required=Truestring='Servicio' args: 'l10n_mx_cfdi.cfdi_service' -
stamp_numberIntegerrequired=Truestring='Cantidad de Folios' -
stamp_priceMonetarycurrency_field='currency_id'required=Truestring='Precio por Folio' -
topup_dateDatetimedefault=fields.Datetime.now()string='Fecha de Adquisición' -
totalMonetarycompute='_compute_total'currency_field='currency_id'store=Truestring='Precio Total'
No public methods.
New fields (38)
-
cancellation_request_proof_fileBinaryattachment=Truereadonly=Truestring='Acuse de solicitud de cancelación' -
cancellation_request_proof_filenameCharreadonly=Truestring='Nombre del archivo de acuse de solicitud de cancelación' -
cert_data_jsonCharreadonly=True -
cert_numberCharcompute='_compute_load_json_data'readonly=Truestring='Número de certificado' -
cfdi_signatureCharcompute='_compute_load_json_data'readonly=Truestring='Firma del CFDI' -
company_idMany2one → res.companydefault=<expr>required=True args: 'res.company' -
files_in_cacheBooleancompute='_compute_download_files_if_needed'readonly=Truestore=False -
folioChar -
is_global_noteBooleandefault=Falsereadonly=Truestring='Nota global' -
issuer_idMany2one → l10n_mx_cfdi.issuerdomain=[('registered', '=', True)]required=Truestring='Emisor' args: 'l10n_mx_cfdi.issuer' -
issuing_datetimeDatetimecompute='_compute_load_json_data'readonly=Truestring='Fecha de emisión' -
l10n_mx_cfdi_autoBooleanreadonly=Truerelated='company_id.l10n_mx_cfdi_auto'string='CFDI Automatico' -
l10n_mx_cfdi_enabledBooleanreadonly=Truerelated='company_id.l10n_mx_cfdi_enabled'string='CFDI Habilitado' -
legacy_without_xmlBooleancompute='_compute_legacy_without_xml'help='Published CFDI without stored stamped XML (typically Facturama-era). Cancel/download via satcfdi is not available for these documents.'string='Legacy without XML' -
nameCharcompute='_compute_name'readonly=Truestore=Truestring='Nombre' -
original_stringCharcompute='_compute_load_json_data'readonly=Truestring='Cadena original' -
pac_providerCharhelp='satcfdi PAC code used when the CFDI was stamped.'readonly=Truestring='PAC Provider' -
pac_supports_cancelBooleanreadonly=Truerelated='issuer_id.service_id.supports_cancel' -
pdf_fileBinaryattachment=Truereadonly=Truestring='Archivo PDF' -
pdf_filenameCharreadonly=Truestring='Nombre del archivo PDF' -
receiver_idMany2one → res.partnerrequired=Truestring='Receptor' args: 'res.partner' -
related_document_idsOne2many → l10n_mx_cfdi.document_relationstring='Documentos relacionados' args: 'l10n_mx_cfdi.document_relation', 'source_id' -
rfc_prov_certifCharcompute='_compute_load_json_data'readonly=Truestring='RFC del proveedor de certificación' -
sat_cert_numberCharcompute='_compute_load_json_data'readonly=Truestring='Número de certificado del SAT' -
sat_signatureCharcompute='_compute_load_json_data'readonly=Truestring='Firma del SAT' -
serieChar -
signing_dateDatetimecompute='_compute_load_json_data'readonly=Truestring='Fecha de timbrado' -
standaloneBooleancompute='_compute_standalone'help='Si está marcado, el certificado no esta relacionado a otros documentos del sistema'store=Truestring='Independiente' -
stateSelectiondefault='draft'readonly=Truestring='Estado' args: [('draft', 'Borrador'), ('pending', 'Pendiente'), ('published', 'Publicada'), ('pending_cancel', 'Cancelación pendiente'), ('canceled', 'Cancelada'), ('unknown', 'Desconocido')] -
tax_codesCharcompute='_compute_load_json_data'readonly=Truestring='Código de impuesto' -
tracking_idCharreadonly=Truestring='ID del documento en el API' -
typeSelectionreadonly=True args: [('I', 'Ingreso'), ('E', 'Egreso'), ('P', 'Pago'), ('T', 'Traslado')] -
uuidCharhelp='UUID asignado por el SAT'readonly=Truestring='UUID' -
verification_qr_codeBinarycompute='_compute_load_json_data'readonly=Truestring='Código QR de Verificación' -
verification_urlCharcompute='_compute_load_json_data'readonly=Truestring='URL de verificación' -
versionChardefault='4.0' -
xml_fileBinaryattachment=Truereadonly=Truestring='Archivo XML' -
xml_filenameCharreadonly=Truestring='Nombre del archivo XML'
-
action_cancel(self) -
action_check_status(self) -
action_get_cancellation_request_proof(self) -
cancel(self, reason: str, replacement=None, simulate=False)Cancel the CFDI through the PAC. Returns a feedback dict with keys ``Status``, ``Message``, ``HasAcuse`` so wizards can show clear post-cancel feedback. -
create(self, vals_list)@api.model_create_multi -
publish(self, cfdi)
New fields (3)
-
relation_type_idMany2one → l10n_mx_catalogs.c_tipo_relacionrequired=True args: 'l10n_mx_catalogs.c_tipo_relacion' -
source_idMany2one → l10n_mx_cfdi.documentondelete='cascade'required=True args: 'l10n_mx_cfdi.document' -
target_idMany2one → l10n_mx_cfdi.documentondelete='cascade'required=True args: 'l10n_mx_cfdi.document'
No public methods.
New fields (9)
-
certificate_fileBinarygroups='base.group_system' -
company_idMany2one → res.companydefault=<expr> args: 'res.company' -
fiscal_nameCharhelp='Razón Social del Emisor' -
key_fileBinarygroups='base.group_system' -
key_passwordChargroups='base.group_system'string='Password' -
logo_urlCharstring='URL del logo' -
partner_idMany2one → res.partnerdelegate=Trueondelete='cascade'required=True args: 'res.partner' -
registeredBooleanstore=True -
service_idMany2one → l10n_mx_cfdi.cfdi_serviceargs: 'l10n_mx_cfdi.cfdi_service'
-
default_get(self, fields_list)@api.model -
register_issuer(self)Validate and activate the local CSD for stamping. For Facturama Multiemisor, also uploads the CSD to the PAC (required before ``issue()``). -
unregister_issuer(self)Deactivate the local CSD registration flag.
New fields (1)
-
codeCharcopy=False
-
create(self, vals_list)@api.model_create_multi
New fields (2)
-
l10n_mx_cfdi_product_code_idMany2one → l10n_mx_catalogs.c_clave_prod_servstring='Código de Producto' args: 'l10n_mx_catalogs.c_clave_prod_serv' -
l10n_mx_cfdi_product_measurement_unit_idMany2one → l10n_mx_catalogs.c_clave_unidadstring='Unidad de Medida' args: 'l10n_mx_catalogs.c_clave_unidad'
No public methods.
New fields (2)
-
l10n_mx_cfdi_autoBooleandefault=Truehelp='Enable to automatically sign CFDI when validating invoices.' args: 'Create CFDI on post' -
l10n_mx_cfdi_enabledBooleancompute='_compute_l10n_mx_cfdi_enabled'help='Enable CFDI for this company.' args: 'Enable CFDI'
No public methods.
New fields (4)
-
cfdi_use_idMany2one → l10n_mx_catalogs.c_uso_cfdistring='CFDI Usage' args: 'l10n_mx_catalogs.c_uso_cfdi' -
payment_form_idMany2one → l10n_mx_catalogs.c_forma_pagostring='Payment Form' args: 'l10n_mx_catalogs.c_forma_pago' -
payment_method_idMany2one → l10n_mx_catalogs.c_metodo_pagostring='Payment Method' args: 'l10n_mx_catalogs.c_metodo_pago' -
tax_regimeMany2one → l10n_mx_catalogs.c_regimen_fiscalstring='Fiscal Regime' args: 'l10n_mx_catalogs.c_regimen_fiscal'
No public methods.
Loading…
Loading…