Fiscal Queue
l10n_br_fiscal_queue · OCA/l10n-brazil
-
Security25/25No findings
-
Activity25/25Last human commit 1 month ago
-
Required by5/250 modules depend on it
-
Maturity5/25In 1 Odoo series since 16.0
Heuristic over the facts below, not an audit · How it's computed
Description
Este módulo permite transmitir documentos fiscais eletrônicos (NF-e,
NFC-e, etc.) à SEFAZ de forma assíncrona, através do queue_job.
Sem ele, a transmissão à SEFAZ ocorre na mesma transação da ação do usuário: a requisição fica bloqueada durante todo o ida e volta com o webservice da SEFAZ, que pode levar de alguns segundos a mais de um minuto em picos ou indisponibilidade do órgão. Isso prende um worker HTTP e degrada a resposta para todos os usuários.
Com este módulo, a operação fiscal pode ser configurada para enfileirar
a transmissão: a ação do usuário retorna imediatamente e o envio à SEFAZ
roda em um worker do queue_job, fora do caminho da requisição.
Dependencies
- Odoo dependencies
- Python dependencies
- requests, transitions, erpbrasil-base>=2.5.0, email-validator, erpbrasil-base>=2.4.2, num2words, phonenumbers
- System dependencies
- None
- Required by
- None
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
Views touched 1
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
operation_inherited_queue_form |
l10n_br_fiscal.operation.inherited_form in (l10n_br_fiscal_queue) | l10n_br_fiscal.operation | form | Inherits l10n_br_fiscal.operation_form |
HTTP endpoints 0
No HTTP endpoints found for this module.
Models touched 2
No new fields.
Public methods (1)-
action_document_send(self)Split documents between synchronous and queued transmission. Documents whose fiscal operation is configured as ``with_delay`` keep their state and get a queue_job that fires the ``action_send`` transition later, off the HTTP worker. The remaining documents go through the state machine right away, as in ``l10n_br_fiscal_edi``.
-
queue_document_sendSelectiondefault='send_now'help='Send Immediately: transmit the fiscal document to SEFAZ in the same transaction (synchronous).\nSend Later: enqueue the transmission as a queue_job, so the SEFAZ round trip does not block the user request.'required=Trueselection=[('send_now', 'Send Immediately'), ('with_delay', 'Send Later')]string='Transmission moment'
No public methods.