Skip to content

Make queue_job/controllers/main.py compatible with Python 3.9#892

Merged
OCA-git-bot merged 2 commits into
OCA:16.0from
rossigee:16.0
Feb 12, 2026
Merged

Make queue_job/controllers/main.py compatible with Python 3.9#892
OCA-git-bot merged 2 commits into
OCA:16.0from
rossigee:16.0

Conversation

@rossigee
Copy link
Copy Markdown

Replace Job | None with Optional[Job] and add typing import.

refs #891

Replace Job | None with Optional[Job] and add typing import.
@OCA-git-bot
Copy link
Copy Markdown
Contributor

Hi @guewen, @sbidoul,
some modules you are maintaining are being modified, check this out!

@sbidoul
Copy link
Copy Markdown
Member

sbidoul commented Feb 12, 2026

/ocabot merge patch

@OCA-git-bot
Copy link
Copy Markdown
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 16.0-ocabot-merge-pr-892-by-sbidoul-bump-patch, awaiting test results.

@OCA-git-bot
Copy link
Copy Markdown
Contributor

Congratulations, your PR was merged at 91a8c93. Thanks a lot for contributing to OCA. ❤️

@OCA-git-bot OCA-git-bot merged commit 3a60d03 into OCA:16.0 Feb 12, 2026
7 checks passed
deeniiz added a commit to nuobit/odoo-addons that referenced this pull request Apr 24, 2026
…ions

bind_export in connector_extension performs cr.commit() to persist the
binding immediately after the SAP HTTP PATCH succeeds. This is intentional:
it prevents duplicate addresses being created in SAP on job retry (when
the adapter's -2035 counter would increment AddressName to "(2)", "(3)"
etc. for the same partner on each retry attempt).

Since queue_job 16.0.2.13.2 (OCA/queue#892), the _prevent_commit guard
raises RuntimeError on any cr.commit() inside a job. Setting allow_commit
=True on the Job Function makes perform() run in a temporary env with a
separate DB cursor: the commit is real but does not release the main
cursor's queue_job row-lock, so there is no double execution risk.

Post-migration updates the existing auto-created queue.job.function
records for:
  - sapb1.binding
  - sapb1.res.partner
  - sapb1.sale.order
  - sapb1.sale.order.line
  - sapb1.product.product

Refs: https://github.com/OCA/queue/wiki/Upgrade-warning:-commits-inside-jobs

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants