Connects the OCA EDI framework to Azure Service Bus: an outbound send handler, an inbound consumer, a connection config model, and idempotent ingestion.
OCA EDI ships file/SFTP/FTP/S3 and HTTP transports — but no Azure Service Bus. This module is that missing transport, as a thin, reusable, config-driven addon. Odoo stays standard; the only custom surface is this adapter.
- Odoo 18.0, OCA
edi_oca,queue_job pip install azure-servicebus
The handler inherits edi.oca.handler.{send,receive,check}, so it auto-registers
as sender/receiver/checker and is selectable on an exchange type:
- send_model_id →
edi.azure_servicebus.handler(publishes the record payload) - receive_model_id → same (returns the body the consumer attached)
- check_model_id → same (verifies connection config)
Inbound record creation is done by azure.servicebus.consumer.consume(backend_id)
(run via cron / queue_job): receive → create edi.exchange.record → process →
settle (complete / abandon). Idempotency via external_identifier = message_id.
- Create an
azure.servicebus.backend(connection string / managed identity, queue or topic+subscription). - Link it on the EDI backend (
azure_servicebus_backend_id). - Bind the handler on your exchange type's send / receive / check model.
Send + inbound consumer + idempotency are implemented and proven against the
Microsoft Service Bus emulator. Production hardening TODO: managed-identity auth,
topic + subscription, async via queue_job (with_delay), dead-letter + lock
renewal, Azure Monitor metrics, tests/CI. See the repo FINDINGS.md.
AGPL-3