Mock do serviço SEFAZ DF-e para desenvolvimento sem certificado A1.
Substitui as chamadas à SEFAZ por respostas locais, permitindo testar o fluxo completo de distribuição, manifestação e importação de documentos fiscais eletrônicos em ambiente de desenvolvimento.
auto_awesome What this module does
AI-generated from the code · Odoo 18.0Lets you test the Brazilian electronic fiscal document (DF-e) flow without a real SEFAZ connection or A1 certificate, by answering distribution and manifestation requests from a local pool of fake documents you generate yourself.
This module is a development/testing tool. It replaces the real SEFAZ and ADN web services with local answers, so you can run the whole DF-e flow (distribution, manifestation, import) without a certificate.
What you can do: - Turn on "DF-e Mock Mode" on the company. Only fiscal managers can flip this switch; a banner on the DF-e screens shows the state. - Generate fake documents with the "Generate Mock NSU" wizard: choose quantity, NF-e or NFS-e, and which document types to create (resNFe, procNFe, resEvento, procEventoNFe). The wizard builds valid-looking XML with correct access keys and dates. - Browse the "Mock NSU Pool" list and form, where each fake document shows its NSU, type, access key, consumed flag and XML (with an indented preview). A "Reset Consumed" button makes a document available again.
Automatic behaviours: - When mock mode is on, distribution queries for NF-e and NFS-e are answered from the pool instead of SEFAZ; documents returned by a normal query are marked consumed. - Confirming a "ciência da operação" manifestation returns a fake success and automatically creates a procNFe in the pool for that access key. - NFS-e lookups by access key and event lists are also answered locally.
Each NSU must be unique per company and fiscal type. The module touches res.company, dfe.mock.nsu, the manifestation event model l10n_br_nfe.md_event and the generation wizard.
Menus it adds
Models and fields (4)
- res.company · extends an existing modeldfe_mock_mode (DF-e Mock Mode)
- dfe.mock.nsu · new modelnsu (NSU), consumed, access_key, company_id, xml_pretty (Indented XML), fiscal_type, schema_type, xml_content
- l10n_br_nfe.md_event · extends an existing model
- dfe.mock.generate.wizard · new modelquantity, company_id, fiscal_type, generate_res_nfe (Generate resNFe), generate_proc_nfe (Generate procNFe), generate_res_evento (Generate resEvento), generate_proc_evento_nfe (Generate procEventoNFe)
Text generated by AI (DeepSeek) from reading the Odoo 18.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: 3 confirmed, 6 with no information of 9 versions.
Sources · Odoo 18.0
Confirmed on 2026-11-03 in branch 18.0 of OCA/l10n-brazil.
terminal Installation and usage
OCA documentation · Odoo 18.0Usage
Source · Odoo 18.0Os controles do mock são visíveis apenas para gerentes fiscais e atuam sobre a empresa ativa.
No topo da lista Fiscal › Consultas DF-e › NF-e de Terceiros:
- Consultar NF-e: dispara a distribuição DF-e de NF-e da empresa.
- Alternar Mock: liga ou desliga o modo mock da empresa (também disponível no campo Modo Mock DF-e da aba DF-e da empresa).
- Resetar Cooldown: limpa o intervalo de espera entre consultas imposto após cada resposta da SEFAZ.
No menu Fiscal › Consultas DF-e › Mock:
- Gerar NSU Mock: cria resumos (resNFe), NF-e completas (procNFe) e eventos no pool local de NSUs.
- Pool de NSU Mock: lista os NSUs gerados e permite resetar os consumidos.
Com o modo mock ligado, manifestar Ciência da Operação em um resumo gera a NF-e completa correspondente no pool, que chega na consulta seguinte.
No verified information in OCA: Installation, Configuration.
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.