From 2dc4e842cc02bf24b80ce25550bb897bba6b7084 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Sun, 29 Mar 2020 05:33:59 +0000 Subject: [PATCH] [UPD] README.rst --- queue_job/static/description/index.html | 8 ++++---- queue_job_batch/static/description/index.html | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/queue_job/static/description/index.html b/queue_job/static/description/index.html index fd99d8022..5f38755cf 100644 --- a/queue_job/static/description/index.html +++ b/queue_job/static/description/index.html @@ -379,16 +379,16 @@

Job Queue

class MyModel(models.Model): _name = 'my.model' - @api.multi + @api.multi @job - def my_method(self, a, k=None): + def my_method(self, a, k=None): _logger.info('executed with a: %s and k: %s', a, k) class MyOtherModel(models.Model): _name = 'my.other.model' - @api.multi + @api.multi def button_do_stuff(self): self.env['my.model'].with_delay().my_method('a', k=2) @@ -514,7 +514,7 @@

Developers

super().setUpClass() cls.env = cls.env(context=dict( cls.env.context, - test_queue_job_no_delay=True, # no jobs thanks + test_queue_job_no_delay=True, # no jobs thanks ))

Then all your tests execute the job methods synchronously diff --git a/queue_job_batch/static/description/index.html b/queue_job_batch/static/description/index.html index e5adebe69..27da6f914 100644 --- a/queue_job_batch/static/description/index.html +++ b/queue_job_batch/static/description/index.html @@ -379,16 +379,16 @@

Job Queue Batch

class MyModel(models.Model): _name = 'my.model' - @api.multi + @api.multi @job - def my_method(self, a, k=None): + def my_method(self, a, k=None): _logger.info('executed with a: %s and k: %s', a, k) class MyOtherModel(models.Model): _name = 'my.other.model' - @api.multi + @api.multi def button_do_stuff(self): batch = self.env['queue.job.batch'].get_new_batch('Group') for i in range(1, 100):