We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7b2c768 + 41fe0db commit 03f55aeCopy full SHA for 03f55ae
1 file changed
queue_job_cron/models/ir_cron.py
@@ -17,13 +17,16 @@ class IrCron(models.Model):
17
comodel_name="queue.job.channel",
18
compute="_compute_run_as_queue_job",
19
readonly=False,
20
+ store=True,
21
string="Channel",
22
)
23
24
@api.depends("run_as_queue_job")
25
def _compute_run_as_queue_job(self):
26
for cron in self:
- if cron.run_as_queue_job and not cron.channel_id:
27
+ if cron.channel_id:
28
+ continue
29
+ if cron.run_as_queue_job:
30
cron.channel_id = self.env.ref("queue_job_cron.channel_root_ir_cron").id
31
else:
32
cron.channel_id = False
0 commit comments