Description
Base module to connect Odoo to the Mexican Tax Administration (SAT) portal using FIEL electronic signature credentials.
It provides:
- Multi-company FIEL credentials stored on each res.company record.
- A SAT tab on the company form to configure download flows, sync dates, and manual synchronization.
- A secure FIEL credentials wizard that stores certificate, key, and password without exposing saved values in the UI.
- Generic SAT document storage (l10n_mx_sat.document) for CFDIs and retentions, both issued and received.
- A download orchestration layer (l10n_mx_sat.download.request) that handles XML mass downloads via satcfdi.
- Configurable XML download flows per company: CFDI issued/received and retentions issued/received.
- An adapter (SatClient) that wraps communication with the SAT via the satcfdi library. Other modules can use this adapter without depending directly on satcfdi.
- A factory method company.l10n_mx_sat_get_client() that returns an adapter instance. It can be overridden via _inherit to swap the underlying implementation.
This module downloads and stores SAT XML documents. Automatic metadata synchronization is postponed for a future release. Other custom modules may consume l10n_mx_sat.document records for their own business flows.
auto_awesome What this module does
AI-generated from the code · Odoo 19.0Connect Odoo to Mexico's SAT tax portal using FIEL electronic signature credentials, download CFDIs and retentions (issued and received) automatically, and store them as read-only SAT documents.
This module lets a Mexican company connect Odoo to the SAT (tax authority) portal using its FIEL electronic signature. On the company form you get a SAT tab where you upload the FIEL certificate (.cer), private key (.key) and password, set the dates to sync from, choose which flows to download (issued/received CFDIs and issued/received retentions), and turn on automatic daily download. A secure wizard stores the credentials without showing saved values again.
Downloaded documents are kept in a read-only register called SAT documents, with UUID, kind, direction, SAT status, issuer and receiver RFC and name, dates, total, currency, series and folio. You can open the XML file attached to each document. Documents cannot be created, edited or deleted by hand; they only come from SAT download requests.
A SAT download request record tracks each download: its state (draft, requested, processing, ready, downloading, done, error), date range, SAT request ID, packages and resulting documents. You can queue a request, retry failed ones, and the system automatically splits a date range when SAT says too many records, waits and re-checks while SAT is still processing, and skips duplicate requests. A daily scheduled job performs bulk downloads. Menus appear under a SAT connection root: Documents, Download requests and Settings, with a Configure connections action.
Depends on
Required by other modules
Menus it adds
Models and fields (5)
- res.company · extends an existing modell10n_mx_sat_fiel_cer (FIEL certificate (.cer)), l10n_mx_sat_fiel_key (FIEL private key (.key)), l10n_mx_sat_fiel_rfc (RFC FIEL), l10n_mx_sat_last_sync (Last XML sync), l10n_mx_sat_sync_from (Sync documents from), l10n_mx_sat_auto_download (Automatic SAT download), l10n_mx_sat_fiel_password (FIEL password), l10n_mx_sat_document_count (SAT documents), l10n_mx_sat_fiel_configured (FIEL configured), l10n_mx_sat_last_metadata_sync (Last metadata sync), l10n_mx_sat_metadata_sync_from (Sync metadata from), l10n_mx_sat_fiel_key_configured (Llave FIEL configured), l10n_mx_sat_download_cfdi_issued (Download issued CFDIs), l10n_mx_sat_download_cfdi_received (Download received CFDIs), l10n_mx_sat_download_request_count (SAT download requests), l10n_mx_sat_download_retention_issued (Download issued retentions), l10n_mx_sat_download_retention_received (Download received retentions), l10n_mx_sat_fiel_certificate_configured (FIEL certificate configured)
- l10n_mx_sat.document · new modeluuid (UUID), total, series, has_xml (Has XML), direction, company_id (Company), issue_date (Issue date), issuer_rfc (Issuer RFC), sat_status (SAT status), stamp_date (Stamp date), issuer_name (Issuer name), display_name, folio_number (Folio), receiver_rfc (Receiver RFC), voucher_type (Voucher type), attachment_id (XML), currency_code (Currency), document_kind (Document kind), receiver_name (Receiver name), cancellation_date (Cancellation date), download_request_id (SAT request)
- l10n_mx_sat.download.package · new modelstate, company_id, request_id (SAT request), sat_package_id (Package ID)
- l10n_mx_sat.download.request · new modelname (Description), state, date_to (To), can_retry (Can retry), date_from (From), direction, company_id (Company), package_ids (Packages), document_ids (Documents), request_type (Request type), document_kind (Document kind), error_message (Error message), document_count (Processed documents), sat_request_id (SAT request ID), next_process_at (Next process at), reported_cfdi_count (SAT reported CFDIs), request_fingerprint (Request fingerprint)
- l10n_mx_sat.fiel.credentials.wizard · new modelfiel_cer (FIEL certificate (.cer)), fiel_key (FIEL private key (.key)), company_id (Company), fiel_password (FIEL password)
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-03Confirmation 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.0Installation
Source · Odoo 19.0This module requires the Python library satcfdi to communicate with the SAT web services. Install it in the same Python environment as Odoo before using SAT connection features.
Install it with pip (satcfdi >= 26.7.2, which restores Python 3.10 support and the retention download API):
pip install "satcfdi>=26.7.2"satcfdi is declared in the module manifest external_dependencies. OCA CI and Runboat also pin it in the repository root test-requirements.txt (satcfdi>=26.7.2), together with compatible urllib3 and requests pins.
Configuration
Source · Odoo 19.0For each Mexican company:
- Open Settings > Companies > [Company] > SAT tab.
- Click Update FIEL credentials and upload the certificate (
.cer), private key (.key), and password in the wizard. The company VAT/RFC is set automatically from the FIEL certificate. - Once FIEL is configured, the company VAT/RFC becomes read-only and must be updated through the FIEL credentials wizard.
- Review the FIEL configured indicator shown on the company form. Saved credentials are never displayed or downloadable from the UI.
- Choose which XML download flows are enabled:
- CFDI issued
- CFDI received
- Retentiones issued
- Retentiones received
- Optionally set:
- Sync documents from: first XML backfill date.
- Automatic SAT download: enable/disable daily cron processing.
- Click Test connection to validate FIEL credentials.
- Click Sync now to enqueue SAT XML download requests immediately.
Multi-company
Each company keeps its own FIEL credentials, download flow selection, and sync windows. Users only see SAT documents and requests for companies they are allowed to access.
Metadata
Automatic metadata downloads are disabled for now. SAT status refresh from metadata will be implemented in a later release.
Usage
Source · Odoo 19.0After configuration, the daily cron creates and processes SAT XML download requests for each enabled company and for each enabled flow.
Manual review
Open SAT > Documents to browse downloaded CFDIs and retenciones. Use filters for company, SAT status, direction, and document type.
Open SAT > Download Requests to monitor request states, packages, and errors.
Downstream modules
Other modules should read from l10n_mx_sat.document instead of calling SAT web services directly.
Metadata
Automatic metadata synchronization is not scheduled by this module yet. Use XML downloads for document storage and wait for the future metadata refresh logic before expecting SAT status updates from metadata files.
Installation instructions, the distribution package, dependencies and configuration steps are not shown because they have not yet been verified in the module documentation for any version.
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.