From 579297eae8fd3f1b6c87d038ffd4a856fff3dd19 Mon Sep 17 00:00:00 2001 From: Guewen Baconnier Date: Fri, 22 May 2026 10:52:00 +0200 Subject: [PATCH 1/2] [FIX] queue_job: fix verbose warning in tests with patched methods Methods patched with _patch_method leads to a lot of warnings during tests that look like: 2026-05-22 08:44:57,099 1 INFO testdb odoo.tests.common: /odoo/external-src/queue/queue_job/models/base.py:270:_patch_method setting edi.exchange.record.action_exchange_generate to Stack (most recent call last): File "/usr/local/bin/odoo", line 8, in odoo.cli.main() File "/odoo/src/odoo/cli/command.py", line 66, in main o.run(args) File "/odoo/src/odoo/cli/server.py", line 182, in run main(args) File "/odoo/src/odoo/cli/server.py", line 175, in main rc = odoo.service.server.start(preload=preload, stop=stop) File "/odoo/src/odoo/service/server.py", line 1457, in start rc = server.run(preload, stop) File "/odoo/src/odoo/service/server.py", line 622, in run rc = preload_registries(preload) File "/odoo/src/odoo/service/server.py", line 1388, in preload_registries result = loader.run_suite(post_install_suite, global_report=registry._assertion_report) File "/odoo/src/odoo/tests/loader.py", line 118, in run_suite suite(results) File "/usr/local/lib/python3.12/unittest/suite.py", line 84, in __call__ return self.run(*args, **kwds) File "/odoo/src/odoo/tests/suite.py", line 49, in run self._tearDownPreviousClass(None, result) File "/odoo/src/odoo/tests/suite.py", line 190, in _tearDownPreviousClass super()._tearDownPreviousClass(test, result) File "/odoo/src/odoo/tests/suite.py", line 112, in _tearDownPreviousClass previousClass.doClassCleanups() File "/odoo/src/odoo/tests/case.py", line 247, in doClassCleanups function(*args, **kwargs) File "/odoo/src/odoo/tests/common.py", line 989, in reset_changes cls.registry.setup_models(cr) File "/usr/local/lib/python3.12/site-packages/decorator.py", line 232, in fun return caller(func, *(extras + args), **kw) File "/odoo/src/odoo/tools/func.py", line 97, in locked return func(inst, *args, **kwargs) File "/odoo/src/odoo/modules/registry.py", line 375, in setup_models model._register_hook() File "/odoo/external-src/edi-framework/edi_queue_oca/models/edi_exchange_record.py", line 26, in _register_hook self._patch_method(function, self._patch_job_auto_delay(function)) File "/odoo/external-src/queue/queue_job/models/base.py", line 270, in _patch_method setattr(cls, name, wrapped) File "/odoo/src/odoo/tests/common.py", line 971, in metamodel_setattr _logger.runbot( File "/odoo/src/odoo/netsvc.py", line 360, in runbot self.log(logging.RUNBOT, message, *args, **kws) --- queue_job/tests/common.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/queue_job/tests/common.py b/queue_job/tests/common.py index 53dbef045..8773d51cc 100644 --- a/queue_job/tests/common.py +++ b/queue_job/tests/common.py @@ -6,11 +6,19 @@ from operator import attrgetter from unittest import TestCase, mock +from odoo.tests.common import SETATTR_SOURCES + from odoo.addons.queue_job.delay import Graph # pylint: disable=odoo-addons-relative-import from odoo.addons.queue_job.job import Job +# Register queue_job patcher as a known path to prevent verbose warning +# in tests when methods are patched. +SETATTR_SOURCES["_patch_method"] = tuple( + list(SETATTR_SOURCES.get("_patch_method", [])) + ["/queue_job/models/base.py"], +) + @contextmanager def trap_jobs(): @@ -206,7 +214,7 @@ def assert_enqueued_job(self, method, args=None, kwargs=None, properties=None): if expected_call not in actual_calls: raise AssertionError( - "Job {} was not enqueued.\n" "Actual enqueued jobs:\n{}".format( + "Job {} was not enqueued.\nActual enqueued jobs:\n{}".format( self._format_job_call(expected_call), "\n".join( f" * {self._format_job_call(call)}" for call in actual_calls From ce5672789bf1e41b5557d7dea052649263843646 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Tue, 30 Jun 2026 08:40:41 +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 b9ac30d19..979d94d52 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ Available addons addon | version | maintainers | summary --- | --- | --- | --- [base_import_async](base_import_async/) | 18.0.1.0.0 | | Import CSV files in the background -[queue_job](queue_job/) | 18.0.3.1.2 | guewen sbidoul | Job Queue +[queue_job](queue_job/) | 18.0.3.1.3 | guewen sbidoul | Job Queue [queue_job_batch](queue_job_batch/) | 18.0.1.0.0 | | Job Queue Batch [queue_job_cron](queue_job_cron/) | 18.0.1.1.1 | | Scheduled Actions as Queue Jobs [queue_job_cron_jobrunner](queue_job_cron_jobrunner/) | 18.0.1.0.1 | ivantodorovich | Run jobs without a dedicated JobRunner diff --git a/queue_job/README.rst b/queue_job/README.rst index b5fffba28..b27a1675a 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:1a7d130b59eb39161ed944ca426f01cebd6aac4bc2e206685815958bbe18394d + !! source digest: sha256:85d54819989d21ee1d0349ecbcc7eeafe118baa9521524b1ce50fc3fdb890050 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Mature-brightgreen.png diff --git a/queue_job/__manifest__.py b/queue_job/__manifest__.py index 5698cfb1d..fea6a3447 100644 --- a/queue_job/__manifest__.py +++ b/queue_job/__manifest__.py @@ -2,7 +2,7 @@ { "name": "Job Queue", - "version": "18.0.3.1.2", + "version": "18.0.3.1.3", "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 ff714d0b3..c5920c7ac 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:1a7d130b59eb39161ed944ca426f01cebd6aac4bc2e206685815958bbe18394d +!! source digest: sha256:85d54819989d21ee1d0349ecbcc7eeafe118baa9521524b1ce50fc3fdb890050 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

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

This addon adds an integrated Job Queue to Odoo.