Skip to content

Commit d27f83d

Browse files
author
Milan Topuzov
committed
chore(queue): remove Odoo 19 migration comments
Comment-only cleanup; no functional changes.
1 parent f685d12 commit d27f83d

File tree

8 files changed

+1
-17
lines changed

8 files changed

+1
-17
lines changed

queue_job/jobrunner/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
else:
2020
queue_job_config = {}
2121
except ImportError:
22-
# Odoo 19: config.misc is no longer available. Build a minimal config
23-
# from flat odoo.conf options so the runner works without server_environment.
2422
queue_job_config = {}
2523

2624
# Merge flat odoo.conf options as a fallback (applies regardless of whether

queue_job/models/base.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -262,9 +262,7 @@ def _job_prepare_context_before_enqueue(self):
262262

263263
@classmethod
264264
def _patch_method(cls, name, method):
265-
"""Patch ``name`` with ``method`` preserving API metadata (Odoo 19).
266-
267-
Odoo 19 no longer exposes ``api.propagate``. We emulate the
265+
"""``api.propagate`` is no longer exposed. We emulate the
268266
propagation by using ``functools.update_wrapper`` and copying the
269267
decorator metadata which Odoo relies on (see orm.decorators).
270268
"""

queue_job/models/queue_job.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,6 @@ class QueueJob(models.Model):
128128
worker_pid = fields.Integer(readonly=True)
129129

130130
def init(self):
131-
# Odoo 19: self._cr deprecated; use self.env.cr.
132-
# Prefer tools.sql helpers for idempotent DDL.
133131
cr = self.env.cr
134132
index_1 = "queue_job_identity_key_state_partial_index"
135133
index_2 = "queue_job_channel_date_done_date_created_index"
@@ -161,8 +159,6 @@ def _compute_dependency_graph(self):
161159
uuids = [uuid for uuid in self.mapped("graph_uuid") if uuid]
162160
ids_per_graph_uuid = {}
163161
if uuids:
164-
# Odoo 19: avoid ORM warning by using _read_group
165-
# with 'id:recordset' aggregate
166162
rows = self.env["queue.job"]._read_group(
167163
[("graph_uuid", "in", uuids)],
168164
groupby=["graph_uuid"],

queue_job/tests/test_queue_job_protected_write.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
class TestJobCreatePrivate(common.HttpCase):
1010
def test_create_error(self):
1111
self.authenticate("admin", "admin")
12-
# Odoo 19: don't override Cookie header, HttpCase's opener sets
13-
# the required test cookie automatically.
1412
with self.assertRaises(common.JsonRpcException) as cm, mute_logger("odoo.http"):
1513
self.make_jsonrpc_request(
1614
"/web/dataset/call_kw",

queue_job/views/queue_job_function_views.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
<search string="Job Functions">
3636
<field name="name" />
3737
<field name="channel_id" />
38-
<!-- Odoo 19: no <group expand> wrapper in search; inline group-by filter -->
3938
<separator />
4039
<filter
4140
name="group_by_channel"

queue_job/views/queue_job_views.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,6 @@
213213
<field name="exc_message" />
214214
<field name="exc_info" />
215215
<field name="result" />
216-
<!-- Odoo 19: no widget override in search; keep Many2one as-is -->
217216
<field name="company_id" groups="base.group_multi_company" />
218217
<filter
219218
name="wait_dependencies"
@@ -270,7 +269,6 @@
270269
domain="[('date_created', '&gt;=', 'now -30d')]"
271270
/>
272271
<separator />
273-
<!-- Odoo 19: no <group expand> in search; declare group-by filters inline -->
274272
<filter
275273
name="group_by_channel"
276274
string="Channel"

test_queue_job/tests/test_autovacuum.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ def test_old_jobs_are_deleted_by_cron_job(self):
1919
)
2020
stored = self._create_job()
2121
stored.write({"date_done": date_done})
22-
# Odoo 19: run the autovacuum directly to avoid cross-cursor
23-
# visibility nuances when executing cron logic in a separate cursor.
2422
self.env["queue.job"].autovacuum()
2523
self.assertFalse(stored.exists())
2624

test_queue_job/tests/test_job.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,6 @@ def test_follower_when_write_fail(self):
657657
}
658658
inactiveusr = self.user.create(vals)
659659
inactiveusr.partner_id.active = True
660-
# Odoo 19: res.groups uses 'user_ids' instead of 'users'
661660
self.assertFalse(inactiveusr in group.user_ids)
662661
stored = self._create_job()
663662
stored.write({"state": "failed"})

0 commit comments

Comments
 (0)