From 548716675e23c80751c107c0ddbd9cea67257c16 Mon Sep 17 00:00:00 2001 From: GuillemCForgeFlow Date: Fri, 2 Jan 2026 11:54:09 +0100 Subject: [PATCH 1/2] [IMP]queue_job: only subscribe job creator if indicated via boolean method We add the `_subscribe_job_creator` method in `queue.job` which will return True for the cases where we want to subscribe the job creator, False otherwise. --- queue_job/models/queue_job.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/queue_job/models/queue_job.py b/queue_job/models/queue_job.py index 55ee7e526c..04ca44cf2a 100644 --- a/queue_job/models/queue_job.py +++ b/queue_job/models/queue_job.py @@ -350,8 +350,11 @@ def _message_post_on_failure(self): # at every job creation domain = self._subscribe_users_domain() base_users = self.env["res.users"].search(domain) + suscribe_job_creator = self._subscribe_job_creator() for record in self: - users = base_users | record.user_id + users = base_users + if suscribe_job_creator: + users |= record.user_id record.message_subscribe(partner_ids=users.mapped("partner_id").ids) msg = record._message_failed_job() if msg: @@ -368,6 +371,14 @@ def _subscribe_users_domain(self): domain.append(("company_id", "in", companies.ids)) return domain + @api.model + def _subscribe_job_creator(self): + """ + Whether the user that created the job should be subscribed to the job, + in addition to users determined by `_subscribe_users_domain` + """ + return True + def _message_failed_job(self): """Return a message which will be posted on the job when it is failed. From 1acf4c1bd4ea9a7ebacae2e9cc7a42fee11a5712 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Tue, 13 Jan 2026 09:55:17 +0000 Subject: [PATCH 2/2] [BOT] post-merge updates --- README.md | 2 +- queue_job/README.rst | 2 +- queue_job/__manifest__.py | 2 +- queue_job/static/description/index.html | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 53b61dc039..30befd2676 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ Available addons addon | version | maintainers | summary --- | --- | --- | --- [base_import_async](base_import_async/) | 17.0.1.0.0 | | Import CSV files in the background -[queue_job](queue_job/) | 17.0.1.5.1 | guewen | Job Queue +[queue_job](queue_job/) | 17.0.1.5.2 | guewen | Job Queue [queue_job_cron](queue_job_cron/) | 17.0.1.1.0 | | Scheduled Actions as Queue Jobs [queue_job_cron_jobrunner](queue_job_cron_jobrunner/) | 17.0.1.1.0 | ivantodorovich | Run jobs without a dedicated JobRunner [queue_job_subscribe](queue_job_subscribe/) | 17.0.1.0.0 | | Control which users are subscribed to queue job notifications diff --git a/queue_job/README.rst b/queue_job/README.rst index 9b659a7457..f05207e79c 100644 --- a/queue_job/README.rst +++ b/queue_job/README.rst @@ -11,7 +11,7 @@ Job Queue !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:20857af17bb6802106b5203b0d4d7daca00ab1510dd6beb2131aa17e0657df05 + !! source digest: sha256:177da9c735cd42cf48e1a72d0f8f5a19680f8408cc7a8919c69e2ca7e7f350fe !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Mature-brightgreen.png diff --git a/queue_job/__manifest__.py b/queue_job/__manifest__.py index 1cd367c571..9d215d5069 100644 --- a/queue_job/__manifest__.py +++ b/queue_job/__manifest__.py @@ -2,7 +2,7 @@ { "name": "Job Queue", - "version": "17.0.1.5.1", + "version": "17.0.1.5.2", "author": "Camptocamp,ACSONE SA/NV,Odoo Community Association (OCA)", "website": "https://github.com/OCA/queue", "license": "LGPL-3", diff --git a/queue_job/static/description/index.html b/queue_job/static/description/index.html index e80c9ffb9d..a6c54ab739 100644 --- a/queue_job/static/description/index.html +++ b/queue_job/static/description/index.html @@ -372,7 +372,7 @@

Job Queue

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:20857af17bb6802106b5203b0d4d7daca00ab1510dd6beb2131aa17e0657df05 +!! source digest: sha256:177da9c735cd42cf48e1a72d0f8f5a19680f8408cc7a8919c69e2ca7e7f350fe !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Mature License: LGPL-3 OCA/queue Translate me on Weblate Try me on Runboat

This addon adds an integrated Job Queue to Odoo.