OdooWiki OCA HUB

Fiscal Queue

l10n_br_fiscal_queue folder_open OCA/l10n-brazil open_in_new
Uncategorised License: AGPL-3

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.

auto_awesome What this module does

AI-generated from the code · Odoo 16.0

Lets you choose, per fiscal operation, whether electronic fiscal documents (NF-e, NFC-e, etc.) are sent to SEFAZ immediately or queued in the background, so the user's screen is not blocked while waiting for the tax authority.

This module adds a choice on each fiscal operation: send the fiscal document to SEFAZ right away, or send it later through the background job queue. The setting is called "Transmission moment" and appears on the fiscal operation form, right after the document purpose field.

When a fiscal operation is set to "Send Later", pressing the send action on a fiscal document no longer waits for the SEFAZ web service. The document keeps its current status and a background job is created to perform the transmission outside the user's request. The job runs in a dedicated channel named "edocument".

  • If the document is not in a sendable state (open, rejected or sending), the background job does nothing and simply logs that there is nothing to transmit.
  • Documents whose operation is set to "Send Immediately" continue to be transmitted synchronously, exactly as before.
  • When several documents are selected at once, the module separates them: those configured for later go to the queue, the rest are sent immediately.

The module extends the fiscal document and fiscal operation models and adds the new field to the existing fiscal operation form. It relies on the queue_job and l10n_br_fiscal_edi modules.

Models and fields (2)
  • l10n_br_fiscal.document · extends an existing model
  • l10n_br_fiscal.operation · extends an existing modelqueue_document_send (Transmission moment)

Text generated by AI (DeepSeek) from reading the Odoo 16.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub

Availability by version

Reviewed: 2026-11-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation status: 1 confirmed, 8 with no information of 9 versions.

Sources · Odoo 16.0

Confirmed on 2026-11-03 in branch 16.0 of OCA/l10n-brazil.

terminal Installation and usage

OCA documentation · Odoo 16.0

Este módulo depende de l10n_br_fiscal_edi (fluxo de emissão de documentos fiscais na série 16.0) e de queue_job.

Em cada operação fiscal (Fiscal / Configuração / Operações Fiscais), o campo Momento da transmissão (queue_document_send) define o comportamento de envio dos documentos gerados por aquela operação:

  • Send Immediately (padrão): transmite à SEFAZ na mesma transação (síncrono), preservando o comportamento original.
  • Send Later: enfileira a transmissão como um queue_job, no canal root.edocument.

O queue_job precisa estar com o job runner ativo para que os jobs enfileirados sejam processados. Consulte a documentação do queue_job para configurar o runner e os canais.

Ao confirmar e enviar um documento fiscal cuja operação está configurada como Send Later, a transmissão à SEFAZ é enfileirada em vez de executada na hora. O documento permanece no estado Aguardando envio até que o job seja processado pelo queue_job; concluída a transmissão, o estado avança normalmente (autorizada, rejeitada, etc.), como no envio síncrono.

Os jobs enfileirados podem ser acompanhados em Job Queue / Jobs, no canal root.edocument.

info

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.