REFACTOR Make queue_job dependencies optional - #278
Conversation
ecino
commented
Jun 29, 2026
- NEW module queue_job_sh_safe that will safely use queue_jobs when available and fallback to an alternate mechanism with ir_cron in case the module is not installed.
- This is useful for Nordic using odoo.sh on which queue jobs are prohibited and not optimal for the infrastructure
- NEW module queue_job_sh_safe that will safely use queue_jobs when available and fallback to an alternate mechanism with ir_cron in case the module is not installed. - This is useful for Nordic using odoo.sh on which queue jobs are prohibited and not optimal for the infrastructure
There was a problem hiding this comment.
Code Review
This pull request replaces the dependency on queue_job with queue_job_optional across several modules, transitioning from standard with_delay calls to with_delay_sh for asynchronous execution. It also attempts to make dictionary access safer when retrieving product_id and contract_id in bank_statement_line.py. However, the reviewer identified a potential TypeError in this safe-access implementation if the fields are present but set to False (the standard representation for empty many2one fields in Odoo), and provided a code suggestion to resolve this issue.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Confidence Score: 4/5The change is not ready to merge until the manifest dependency name is corrected. The touched area is narrow and the main issue is a concrete install/upgrade blocker in the module dependency declaration. account_statement_import_compassion_ee/manifest.py and recurring_contract/manifest.py
What T-Rex did
Reviews (3): Last reviewed commit: "Merge branch '18.0' into ecino/queue-job..." | Re-trigger Greptile |
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
9f153d2 to
14ac9b3
Compare
| "depends": [ | ||
| # OCA/queue | ||
| "queue_job", | ||
| "queue_job_optional", |
There was a problem hiding this comment.
Fix dependency name
The manifests now depend on queue_job_optional, but this repository does not add that module and the PR description names the new compatibility module as queue_job_sh_safe. With the current dependency, Odoo cannot install or upgrade account_statement_import_compassion_ee or recurring_contract unless an unrelated addon named queue_job_optional is present in the addons path.
Artifacts
Repro: generated manifest dependency resolver script
- Contains supporting evidence from the run (text/x-python; charset=utf-8).
Repro: resolver terminal output showing missing queue_job_optional dependency
- Keeps the command output available without making the summary code-heavy.
|
LGTM |