diff --git a/queue_job/models/queue_job.py b/queue_job/models/queue_job.py index 961dd7dfff..c980cd9af4 100644 --- a/queue_job/models/queue_job.py +++ b/queue_job/models/queue_job.py @@ -241,6 +241,18 @@ def requeue(self): return {'type': 'ir.actions.act_window_close'} +class SetJobsToDone(models.TransientModel): + _inherit = 'queue.requeue.job' + _name = 'queue.jobs.to.done' + _description = 'Set all selected jobs to done' + + @api.multi + def set_done(self): + jobs = self.job_ids + jobs.button_done() + return {'type': 'ir.actions.act_window_close'} + + class JobChannel(models.Model): _name = 'queue.job.channel' _description = 'Job Channels' diff --git a/queue_job/views/queue_job_views.xml b/queue_job/views/queue_job_views.xml index ce71297535..22a33061d3 100644 --- a/queue_job/views/queue_job_views.xml +++ b/queue_job/views/queue_job_views.xml @@ -150,7 +150,22 @@ + + + + + + Requeue Jobs + queue.jobs.to.done + +
+ + + +
+
@@ -175,6 +190,24 @@ queue.job
+ + Set jobs to done + queue.jobs.to.done + form + form + + new + + + + + Set jobs to done + client_action_multi + + action + queue.job + + queue.job.channel.form queue.job.channel