From 41fe0dbffd688ca46f5d8c49eff3be72596f5257 Mon Sep 17 00:00:00 2001 From: Lois Rilo Date: Fri, 11 Jun 2021 16:11:14 +0200 Subject: [PATCH] [13.0][FIX] queue_job_cron: channel_id must be storable. Otherwise, you cannot use any channel other than default ( root.ir_cron) --- queue_job_cron/models/ir_cron.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/queue_job_cron/models/ir_cron.py b/queue_job_cron/models/ir_cron.py index 440740f164..46fbd1bf64 100644 --- a/queue_job_cron/models/ir_cron.py +++ b/queue_job_cron/models/ir_cron.py @@ -17,13 +17,16 @@ class IrCron(models.Model): comodel_name="queue.job.channel", compute="_compute_run_as_queue_job", readonly=False, + store=True, string="Channel", ) @api.depends("run_as_queue_job") def _compute_run_as_queue_job(self): for cron in self: - if cron.run_as_queue_job and not cron.channel_id: + if cron.channel_id: + continue + if cron.run_as_queue_job: cron.channel_id = self.env.ref("queue_job_cron.channel_root_ir_cron").id else: cron.channel_id = False