Skip to content

[20.0][MIG] edi_queue_oca: Migration to 20.0 - #378

Open
HviorForgeFlow wants to merge 17 commits into
OCA:20.0from
ForgeFlow:20.0-mig-edi_queue_oca
Open

HviorForgeFlow wants to merge 17 commits into
OCA:20.0from
ForgeFlow:20.0-mig-edi_queue_oca

Conversation

@HviorForgeFlow

@HviorForgeFlow HviorForgeFlow commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Standard migration + some improvements:

  • Security moved to ir.access.csv
  • Drop the 19.0 migration script
  • pytz/utcnow replaced by zoneinfo and datetime.now(UTC)

Depends on:

CC @ForgeFlow

etobella and others added 16 commits October 21, 2026 13:45
Currently translated at 100.0% (8 of 8 strings)

Translation: edi-framework-18.0/edi-framework-18.0-edi_queue_oca
Translate-URL: https://translation.odoo-community.org/projects/edi-framework-18-0/edi-framework-18-0-edi_queue_oca/it/
Add a configurable daily execution time on EDI exchange types and inject the
corresponding ETA into queued exchange record jobs.

Added fields to `edi.exchange.type` for enabling ETA scheduling, configuring execution hour, minute, and timezone, and logic to compute the next scheduled runtime in UTC. This allows all jobs for a given exchange type to be held and released together at a fixed time each day, supporting off-peak processing and trading partner requirements.

Enabling ETA scheduling on an exchange type causes every job created for that type to be held in the queue until the configured time of day, rather than being processed immediately. All jobs that arrive during the day accumulate and are released together at that scheduled time.

When ETA scheduling is disabled, jobs are dispatched immediately as usual
Currently translated at 100.0% (18 of 18 strings)

Translation: edi-framework-19.0/edi-framework-19.0-edi_queue_oca
Translate-URL: https://translation.odoo-community.org/projects/edi-framework-19-0/edi-framework-19-0-edi_queue_oca/it/
Rely on new on fail hooks from the queue job module.
The on fail hooks introduced in b3290c7
are declared in a noupdate data file, so databases created before that
commit never got `on_fail_method` on the exchange record job functions,
and failed jobs do not update the exchange record state.

Add a post-migration script to fill the missing values.
The hook joins `exc_name` and `exc_message` as strings, but the message
stored by queue_job is the first argument of the exception, which is
the errno for an OSError and may also be missing. The join then raises
a TypeError and the exchange record is not updated.
An input record was received and then left for the next run of the input
cron to be processed, up to an hour later. Chain the two the way generate
and send already are, so a document is processed as soon as it lands.
Introduces a new class to wrap ``_exchange_$action`` methods.
It stores the methods' results and a message allowing further customization.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants