Connect to the SAT portal using FIEL credentials & manage downloads
Project description
Mexico - SAT Connection
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.
Table of contents
Installation
This module requires the Python library `satcfdi <https://pypi.org/project/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:
pip install satcfdi
Configuration
For 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
After 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.
Bug Tracker
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed feedback.
Do not contact contributors directly about support or help with technical issues.
Credits
Contributors
-
Maxime Chambreuil maxime.chambreuil@graymatterlogic.com
Roberto Cifuentes roberto@cloudlotus.net
Maintainers
This module is maintained by the OCA.
OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.
Current maintainer:
This module is part of the OCA/l10n-mexico project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file odoo_addon_l10n_mx_sat-18.0.1.0.0.2-py3-none-any.whl.
File metadata
- Download URL: odoo_addon_l10n_mx_sat-18.0.1.0.0.2-py3-none-any.whl
- Upload date:
- Size: 110.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8ee761431adf7994115d79ce522398916d08d216f9645ea09c66dc430b9a2409
|
|
| MD5 |
89757bf6fd09f1ec48b26aa22e986f9b
|
|
| BLAKE2b-256 |
4e10cc491e94fb28a211ebbfcd0ab23edae99ada3840006a609eafe84043b4cf
|