Job Queue

queue_job
REPOSITORY
REPOSITORYOCA/queue
GIT
GIThttps://github.com/OCA/queue.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/queue/tree/19.0/queue_job
VERSION
VERSION 2.0.2
CATEGORY
CATEGORYGeneric Modules
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Camptocamp, ACSONE SA/NV
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Camptocamp, ACSONE SA/NV
COMMITTERS
COMMITTERSStéphane Bidoul, Guewen Baconnier, Alexandre Fayolle, Weblate, OCA-git-bot, oca-ci, Fernando, Milan Topuzov
WEBSITE
WEBSITEhttps://github.com/OCA/queue
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:40:49
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - mail
    - base
    - base_setup
    - web
    - bus
    - web_tour
    - html_editor
    - base_sparse_field
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES openupgradelib
requests
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This addon adds an integrated Job Queue to Odoo.

It allows to postpone method calls executed asynchronously.

Jobs are executed in the background by a `Jobrunner`, in their own
transaction.

Example:

``` python
from odoo import models, fields, api

class MyModel(models.Model):
   _name = 'my.model'

   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'

    def button_do_stuff(self):
        self.env['my.model'].with_delay().my_method('a', k=2)
```

In the snippet of code above, when we call `button_do_stuff`, a job
**capturing the method and arguments** will be postponed. It will be
executed as soon as the Jobrunner has a free bucket, which can be
instantaneous if no other job is running.

Features:

- Views for jobs, jobs are stored in PostgreSQL
- Jobrunner: execute the jobs, highly efficient thanks to PostgreSQL's
  NOTIFY
- Channels: give a capacity for the root channel and its sub-channels
  and segregate jobs in them. Allow for instance to restrict heavy jobs
  to be executed one at a time while little ones are executed 4 at a
  times.
- Retries: Ability to retry jobs by raising a type of exception
- Retry Pattern: the 3 first tries, retry after 10 seconds, the 5 next
  tries, retry after 1 minutes, ...
- Job properties: priorities, estimated time of arrival (ETA), custom
  description, number of retries
- Related Actions: link an action on the job view, such as open the
  record concerned by the job

Code Analysis

Views touched (14)
XML IDNameModelTypeStatus
view_queue_job_channel_form queue.job.channel.form queue.job.channel form New
view_queue_job_channel_search queue.job.channel.search queue.job.channel search New
view_queue_job_channel_tree queue.job.channel.tree queue.job.channel list New
view_queue_job_form queue.job.form queue.job form New
view_queue_job_function_form queue.job.function.form queue.job.function form New
view_queue_job_function_search queue.job.function.search queue.job.function search New
view_queue_job_function_tree queue.job.function.tree queue.job.function list New
view_queue_job_graph queue.job.graph queue.job graph New
view_queue_job_pivot queue.job.pivot queue.job pivot New
view_queue_job_search queue.job.search queue.job search New
view_queue_job_tree queue.job.tree queue.job list New
view_requeue_job Requeue Jobs queue.requeue.job form New
view_set_jobs_cancelled Cancel Jobs queue.jobs.to.cancelled form New
view_set_jobs_done Set Jobs to Done queue.jobs.to.done form New
Models touched (9)

New fields (0)

No new fields.

Public methods (2)
  • delayable(self, priority=None, eta=None, max_retries=None, description=None, channel=None, identity_key=None)
    Return a ``Delayable`` The returned instance allows to enqueue any method of the recordset's Model. Usage:: delayable = self.env["res.users"].browse(10).delayable(priority=20) delayable.do_work(name="test"}).delay() In this example, the ``do_work`` method will not be executed directly. It will be executed in an asynchronous job. Method calls on a Delayable generally return themselves, so calls can be chained together:: delayable.set(priority=15).do_work(name="test"}).delay() The order of the calls that build the job is not relevant, beside the call to ``delay()`` that must happen at the very end. This is equivalent to the example above:: delayable.do_work(name="test"}).set(priority=15).delay() Very importantly, ``delay()`` must be called on the top-most parent of a chain of jobs, so if you have this:: job1 = record1.delayable().do_work() job2 = record2.delayable().do_work() job1.on_done(job2) The ``delay()`` call must be made on ``job1``, otherwise ``job2`` will be delayed, but ``job1`` will never be. When done on ``job1``, the ``delay()`` call will traverse the graph of jobs and delay all of them:: job1.delay() For more details on the graph dependencies, read the documentation of :module:`~odoo.addons.queue_job.delay`. :param priority: Priority of the job, 0 being the higher priority. Default is 10. :param eta: Estimated Time of Arrival of the job. It will not be executed before this date/time. :param max_retries: maximum number of retries before giving up and set the job state to 'failed'. A value of 0 means infinite retries. Default is 5. :param description: human description of the job. If None, description is computed from the function doc or name :param channel: the complete name of the channel to use to process the function. If specified it overrides the one defined on the function :param identity_key: key uniquely identifying the job, if specified and a job with the same key has not yet been run, the new job will not be added. It is either a string, either a function that takes the job as argument (see :py:func:`..job.identity_exact`). the new job will not be added. :return: instance of a Delayable :rtype: :class:`odoo.addons.queue_job.job.Delayable`
  • with_delay(self, priority=None, eta=None, max_retries=None, description=None, channel=None, identity_key=None)
    Return a ``DelayableRecordset`` It is a shortcut for the longer form as shown below:: self.with_delay(priority=20).action_done() # is equivalent to: self.delayable().set(priority=20).action_done().delay() ``with_delay()`` accepts job properties which specify how the job will be executed. Usage with job properties:: env['a.model'].with_delay(priority=30, eta=60*60*5).action_done() delayable.export_one_thing(the_thing_to_export) # => the job will be executed with a low priority and not before a # delay of 5 hours from now When using :meth:``with_delay``, the final ``delay()`` is implicit. See the documentation of :meth:``delayable`` for more details. :return: instance of a DelayableRecordset :rtype: :class:`odoo.addons.queue_job.job.DelayableRecordset`

New fields (1)
  • ttype Selection
    ondelete={'job_serialized': 'cascade'} selection_add=[('job_serialized', 'Job Serialized')]
Public methods (0)

No public methods.

New fields (29)
  • channel Char
    index=True
  • channel_method_name Char
    readonly=True string='Complete Method Name'
  • company_id Many2one → res.company
    comodel_name='res.company' index=True string='Company'
  • date_cancelled Datetime
    readonly=True
  • date_created Datetime
    readonly=True string='Created Date'
  • date_done Datetime
    readonly=True
  • date_enqueued Datetime
    readonly=True string='Enqueue Time'
  • date_started Datetime
    readonly=True string='Start Date'
  • eta Datetime
    string='Execute only after'
  • exc_info Text
    readonly=True string='Exception Info'
  • exc_message Char
    readonly=True string='Exception Message' tracking=True
  • exc_name Char
    readonly=True string='Exception'
  • exec_time Float
    aggregator='avg' help='Time required to execute this job in seconds. Average when grouped.' readonly=True string='Execution Time (avg)'
  • func_string Char
    readonly=True string='Task'
  • graph_jobs_count Integer
    compute='_compute_graph_jobs_count'
  • graph_uuid Char
    help='Single shared identifier of a Graph. Empty for a single job.' index=True readonly=True string='Graph UUID'
  • identity_key Char
    readonly=True
  • job_function_id Many2one → queue.job.function
    comodel_name='queue.job.function' readonly=True string='Job Function'
  • max_retries Integer
    help='The job will fail if the number of tries reach the max. retries.\nRetries are infinite when empty.' string='Max. retries'
  • method_name Char
    readonly=True
  • model_name Char
    readonly=True string='Model'
  • name Char
    readonly=True string='Description'
  • priority Integer
    aggregator=False
  • result Text
    readonly=True
  • retry Integer
    string='Current try'
  • state Selection
    index=True readonly=True required=True args: STATES
  • user_id Many2one → res.users
    comodel_name='res.users' string='User ID'
  • uuid Char
    index=True readonly=True required=True string='UUID'
  • worker_pid Integer
    readonly=True
Public methods (10)
  • autovacuum(self)
    Delete all jobs done based on the removal interval defined on the channel Called from a cron.
  • button_cancelled(self)
  • button_done(self)
  • create(self, vals_list)
    @api.model_create_multi@api.private
  • init(self)
  • open_graph_jobs(self)
    Return action that opens all jobs of the same graph
  • open_related_action(self)
    Open the related action associated to the job
  • related_action_open_record(self)
    Open a form view with the record(s) of the job. For instance, for a job on a ``product.product``, it will open a ``product.product`` form view with the product record(s) concerned by the job. If the job concerns more than one record, it opens them in a list. This is the default related action.
  • requeue(self)
  • write(self, vals)

New fields (5)
  • complete_name Char
    compute='_compute_complete_name' readonly=True recursive=True store=True
  • job_function_ids One2many → queue.job.function
    comodel_name='queue.job.function' inverse_name='channel_id' string='Job Functions'
  • name Char
  • parent_id Many2one → queue.job.channel
    comodel_name='queue.job.channel' ondelete='restrict' string='Parent Channel'
  • removal_interval Integer
    default=<expr> required=True
Public methods (3)
  • create(self, vals_list)
    @api.model_create_multi
  • parent_required(self)
    @api.constrains('parent_id', 'name')
  • write(self, values)

New fields (8)
  • allow_commit Boolean
    help='Allows the job to commit transactions during execution. Under the hood, this executes the job in a new database cursor, which incurs an overhead as it requires an extra connection to the database. '
  • channel Char
    readonly=True related='channel_id.complete_name' store=True
  • channel_id Many2one → queue.job.channel
    comodel_name='queue.job.channel' default=<expr> required=True string='Channel'
  • edit_related_action Text
    compute='_compute_edit_related_action' help='The action when the button *Related Action* is used on a job. The default action is to open the view of the record related to the job. Configured as a dictionary with optional keys: enable, func_name, kwargs.\nSee the module description for details.' inverse='_inverse_edit_related_action' string='Related Action'
  • edit_retry_pattern Text
    compute='_compute_edit_retry_pattern' help='Pattern expressing from the count of retries on retryable errors, the number of of seconds to postpone the next execution. Setting the number of seconds to a 2-element tuple or list will randomize the retry interval between the 2 values.\nExample: {1: 10, 5: 20, 10: 30, 15: 300}.\nExample: {1: (1, 10), 5: (11, 20), 10: (21, 30), 15: (100, 300)}.\nSee the module description for details.' inverse='_inverse_edit_retry_pattern' string='Retry Pattern'
  • method Char
  • model_id Many2one → ir.model
    comodel_name='ir.model' ondelete='cascade' string='Model'
  • name Char
    compute='_compute_name' index=True inverse='_inverse_name' store=True
Public methods (6)
  • create(self, vals_list)
    @api.model_create_multi
  • job_config(self, name)
    @tools.ormcache('name')
  • job_default_config(self)
  • job_function_name(model_name, method_name)
    @staticmethod
  • unlink(self)
  • write(self, values)

New fields (1)
  • queue_job_id Many2one → queue.job
    comodel_name='queue.job' index=True ondelete='cascade' required=True
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • set_cancelled(self)

New fields (0)

No new fields.

Public methods (1)
  • set_done(self)

New fields (1)
  • job_ids Many2many → queue.job
    comodel_name='queue.job' default=<expr> string='Jobs'
Public methods (1)
  • requeue(self)
REPOSITORY
REPOSITORYOCA/queue
GIT
GIThttps://github.com/OCA/queue.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/queue/tree/18.0/queue_job
VERSION
VERSION 3.1.3
CATEGORY
CATEGORYGeneric Modules
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Camptocamp, ACSONE SA/NV
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Camptocamp, ACSONE SA/NV
COMMITTERS
COMMITTERSStéphane Bidoul, Guewen Baconnier, Alexandre Fayolle, GitHub, Lois Rilo, Florent Xicluna, Thomas Binsfeld, Weblate, OCA-git-bot, Simone Orsi, oca-ci, Adam Heinz, Vincent Hatakeyama, Zina Rasoamanana, oca-git-bot, Andrii9090-tecnativa, Florian Mounier, thien, RLeeOSI, hoangtrann
WEBSITE
WEBSITEhttps://github.com/OCA/queue
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:30:14
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - mail
    - base
    - base_setup
    - web
    - bus
    - web_tour
    - html_editor
    - base_sparse_field
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES requests
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This addon adds an integrated Job Queue to Odoo.

It allows to postpone method calls executed asynchronously.

Jobs are executed in the background by a `Jobrunner`, in their own
transaction.

Example:

``` python
from odoo import models, fields, api

class MyModel(models.Model):
   _name = 'my.model'

   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'

    def button_do_stuff(self):
        self.env['my.model'].with_delay().my_method('a', k=2)
```

In the snippet of code above, when we call `button_do_stuff`, a job
**capturing the method and arguments** will be postponed. It will be
executed as soon as the Jobrunner has a free bucket, which can be
instantaneous if no other job is running.

Features:

- Views for jobs, jobs are stored in PostgreSQL
- Jobrunner: execute the jobs, highly efficient thanks to PostgreSQL's
  NOTIFY
- Channels: give a capacity for the root channel and its sub-channels
  and segregate jobs in them. Allow for instance to restrict heavy jobs
  to be executed one at a time while little ones are executed 4 at a
  times.
- Retries: Ability to retry jobs by raising a type of exception
- Retry Pattern: the 3 first tries, retry after 10 seconds, the 5 next
  tries, retry after 1 minutes, ...
- Job properties: priorities, estimated time of arrival (ETA), custom
  description, number of retries
- Related Actions: link an action on the job view, such as open the
  record concerned by the job

Code Analysis

Views touched (14)
XML IDNameModelTypeStatus
view_queue_job_channel_form queue.job.channel.form queue.job.channel form New
view_queue_job_channel_search queue.job.channel.search queue.job.channel search New
view_queue_job_channel_tree queue.job.channel.tree queue.job.channel list New
view_queue_job_form queue.job.form queue.job form New
view_queue_job_function_form queue.job.function.form queue.job.function form New
view_queue_job_function_search queue.job.function.search queue.job.function search New
view_queue_job_function_tree queue.job.function.tree queue.job.function list New
view_queue_job_graph queue.job.graph queue.job graph New
view_queue_job_pivot queue.job.pivot queue.job pivot New
view_queue_job_search queue.job.search queue.job search New
view_queue_job_tree queue.job.tree queue.job list New
view_requeue_job Requeue Jobs queue.requeue.job form New
view_set_jobs_cancelled Cancel Jobs queue.jobs.to.cancelled form New
view_set_jobs_done Set Jobs to Done queue.jobs.to.done form New
Models touched (9)

New fields (0)

No new fields.

Public methods (2)
  • delayable(self, priority=None, eta=None, max_retries=None, description=None, channel=None, identity_key=None)
    Return a ``Delayable`` The returned instance allows to enqueue any method of the recordset's Model. Usage:: delayable = self.env["res.users"].browse(10).delayable(priority=20) delayable.do_work(name="test"}).delay() In this example, the ``do_work`` method will not be executed directly. It will be executed in an asynchronous job. Method calls on a Delayable generally return themselves, so calls can be chained together:: delayable.set(priority=15).do_work(name="test"}).delay() The order of the calls that build the job is not relevant, beside the call to ``delay()`` that must happen at the very end. This is equivalent to the example above:: delayable.do_work(name="test"}).set(priority=15).delay() Very importantly, ``delay()`` must be called on the top-most parent of a chain of jobs, so if you have this:: job1 = record1.delayable().do_work() job2 = record2.delayable().do_work() job1.on_done(job2) The ``delay()`` call must be made on ``job1``, otherwise ``job2`` will be delayed, but ``job1`` will never be. When done on ``job1``, the ``delay()`` call will traverse the graph of jobs and delay all of them:: job1.delay() For more details on the graph dependencies, read the documentation of :module:`~odoo.addons.queue_job.delay`. :param priority: Priority of the job, 0 being the higher priority. Default is 10. :param eta: Estimated Time of Arrival of the job. It will not be executed before this date/time. :param max_retries: maximum number of retries before giving up and set the job state to 'failed'. A value of 0 means infinite retries. Default is 5. :param description: human description of the job. If None, description is computed from the function doc or name :param channel: the complete name of the channel to use to process the function. If specified it overrides the one defined on the function :param identity_key: key uniquely identifying the job, if specified and a job with the same key has not yet been run, the new job will not be added. It is either a string, either a function that takes the job as argument (see :py:func:`..job.identity_exact`). the new job will not be added. :return: instance of a Delayable :rtype: :class:`odoo.addons.queue_job.job.Delayable`
  • with_delay(self, priority=None, eta=None, max_retries=None, description=None, channel=None, identity_key=None)
    Return a ``DelayableRecordset`` It is a shortcut for the longer form as shown below:: self.with_delay(priority=20).action_done() # is equivalent to: self.delayable().set(priority=20).action_done().delay() ``with_delay()`` accepts job properties which specify how the job will be executed. Usage with job properties:: env['a.model'].with_delay(priority=30, eta=60*60*5).action_done() delayable.export_one_thing(the_thing_to_export) # => the job will be executed with a low priority and not before a # delay of 5 hours from now When using :meth:``with_delay``, the final ``delay()`` is implicit. See the documentation of :meth:``delayable`` for more details. :return: instance of a DelayableRecordset :rtype: :class:`odoo.addons.queue_job.job.DelayableRecordset`

New fields (1)
  • ttype Selection
    ondelete={'job_serialized': 'cascade'} selection_add=[('job_serialized', 'Job Serialized')]
Public methods (0)

No public methods.

New fields (29)
  • channel Char
    index=True
  • channel_method_name Char
    readonly=True string='Complete Method Name'
  • company_id Many2one → res.company
    comodel_name='res.company' index=True string='Company'
  • date_cancelled Datetime
    readonly=True
  • date_created Datetime
    readonly=True string='Created Date'
  • date_done Datetime
    readonly=True
  • date_enqueued Datetime
    readonly=True string='Enqueue Time'
  • date_started Datetime
    readonly=True string='Start Date'
  • eta Datetime
    string='Execute only after'
  • exc_info Text
    readonly=True string='Exception Info'
  • exc_message Char
    readonly=True string='Exception Message' tracking=True
  • exc_name Char
    readonly=True string='Exception'
  • exec_time Float
    aggregator='avg' help='Time required to execute this job in seconds. Average when grouped.' readonly=True string='Execution Time (avg)'
  • func_string Char
    readonly=True string='Task'
  • graph_jobs_count Integer
    compute='_compute_graph_jobs_count'
  • graph_uuid Char
    help='Single shared identifier of a Graph. Empty for a single job.' index=True readonly=True string='Graph UUID'
  • identity_key Char
    readonly=True
  • job_function_id Many2one → queue.job.function
    comodel_name='queue.job.function' readonly=True string='Job Function'
  • max_retries Integer
    help='The job will fail if the number of tries reach the max. retries.\nRetries are infinite when empty.' string='Max. retries'
  • method_name Char
    readonly=True
  • model_name Char
    readonly=True string='Model'
  • name Char
    readonly=True string='Description'
  • priority Integer
    aggregator=False
  • result Text
    readonly=True
  • retry Integer
    string='Current try'
  • state Selection
    index=True readonly=True required=True args: STATES
  • user_id Many2one → res.users
    comodel_name='res.users' string='User ID'
  • uuid Char
    index=True readonly=True required=True string='UUID'
  • worker_pid Integer
    readonly=True
Public methods (10)
  • autovacuum(self)
    Delete all jobs done based on the removal interval defined on the channel Called from a cron.
  • button_cancelled(self)
  • button_done(self)
  • create(self, vals_list)
    @api.model_create_multi@api.private
  • init(self)
  • open_graph_jobs(self)
    Return action that opens all jobs of the same graph
  • open_related_action(self)
    Open the related action associated to the job
  • related_action_open_record(self)
    Open a form view with the record(s) of the job. For instance, for a job on a ``product.product``, it will open a ``product.product`` form view with the product record(s) concerned by the job. If the job concerns more than one record, it opens them in a list. This is the default related action.
  • requeue(self)
  • write(self, vals)

New fields (5)
  • complete_name Char
    compute='_compute_complete_name' readonly=True recursive=True store=True
  • job_function_ids One2many → queue.job.function
    comodel_name='queue.job.function' inverse_name='channel_id' string='Job Functions'
  • name Char
  • parent_id Many2one → queue.job.channel
    comodel_name='queue.job.channel' ondelete='restrict' string='Parent Channel'
  • removal_interval Integer
    default=<expr> required=True
Public methods (4)
  • create(self, vals_list)
    @api.model_create_multi
  • parent_required(self)
    @api.constrains('parent_id', 'name')
  • unlink(self)
  • write(self, values)

New fields (8)
  • allow_commit Boolean
    help='Allows the job to commit transactions during execution. Under the hood, this executes the job in a new database cursor, which incurs an overhead as it requires an extra connection to the database. '
  • channel Char
    readonly=True related='channel_id.complete_name' store=True
  • channel_id Many2one → queue.job.channel
    comodel_name='queue.job.channel' default=<expr> required=True string='Channel'
  • edit_related_action Text
    compute='_compute_edit_related_action' help='The action when the button *Related Action* is used on a job. The default action is to open the view of the record related to the job. Configured as a dictionary with optional keys: enable, func_name, kwargs.\nSee the module description for details.' inverse='_inverse_edit_related_action' string='Related Action'
  • edit_retry_pattern Text
    compute='_compute_edit_retry_pattern' help='Pattern expressing from the count of retries on retryable errors, the number of of seconds to postpone the next execution. Setting the number of seconds to a 2-element tuple or list will randomize the retry interval between the 2 values.\nExample: {1: 10, 5: 20, 10: 30, 15: 300}.\nExample: {1: (1, 10), 5: (11, 20), 10: (21, 30), 15: (100, 300)}.\nSee the module description for details.' inverse='_inverse_edit_retry_pattern' string='Retry Pattern'
  • method Char
  • model_id Many2one → ir.model
    comodel_name='ir.model' ondelete='cascade' string='Model'
  • name Char
    compute='_compute_name' index=True inverse='_inverse_name' store=True
Public methods (6)
  • create(self, vals_list)
    @api.model_create_multi
  • job_config(self, name)
    @tools.ormcache('name')
  • job_default_config(self)
  • job_function_name(model_name, method_name)
    @staticmethod
  • unlink(self)
  • write(self, values)

New fields (1)
  • queue_job_id Many2one → queue.job
    comodel_name='queue.job' index=True ondelete='cascade' required=True
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • set_cancelled(self)

New fields (0)

No new fields.

Public methods (1)
  • set_done(self)

New fields (1)
  • job_ids Many2many → queue.job
    comodel_name='queue.job' default=<expr> string='Jobs'
Public methods (1)
  • requeue(self)
REPOSITORY
REPOSITORYOCA/queue
GIT
GIThttps://github.com/OCA/queue.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/queue/tree/17.0/queue_job
VERSION
VERSION 1.5.3
CATEGORY
CATEGORYGeneric Modules
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Camptocamp, ACSONE SA/NV
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Camptocamp, ACSONE SA/NV
COMMITTERS
COMMITTERSStéphane Bidoul, Guewen Baconnier, Alexandre Fayolle, Pedro M. Baeza, GitHub, Lois Rilo, Florent Xicluna, JordiMForgeFlow, Thomas Binsfeld, Weblate, OCA-git-bot, Iván Todorovich, oca-ci, GuillemCForgeFlow, François Degrave, Jose Zambudio, matthieu.saison, thien, chien, Bastian Guenther, maso, Mauro Cebriá Berbegal
WEBSITE
WEBSITEhttps://github.com/OCA/queue
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:20:07
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - mail
    - base
    - base_setup
    - web
    - bus
    - web_tour
    - base_sparse_field
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES requests
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This addon adds an integrated Job Queue to Odoo.

It allows to postpone method calls executed asynchronously.

Jobs are executed in the background by a `Jobrunner`, in their own
transaction.

Example:

``` python
from odoo import models, fields, api

class MyModel(models.Model):
   _name = 'my.model'

   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'

    def button_do_stuff(self):
        self.env['my.model'].with_delay().my_method('a', k=2)
```

In the snippet of code above, when we call `button_do_stuff`, a job
**capturing the method and arguments** will be postponed. It will be
executed as soon as the Jobrunner has a free bucket, which can be
instantaneous if no other job is running.

Features:

- Views for jobs, jobs are stored in PostgreSQL
- Jobrunner: execute the jobs, highly efficient thanks to PostgreSQL's
  NOTIFY
- Channels: give a capacity for the root channel and its sub-channels
  and segregate jobs in them. Allow for instance to restrict heavy jobs
  to be executed one at a time while little ones are executed 4 at a
  times.
- Retries: Ability to retry jobs by raising a type of exception
- Retry Pattern: the 3 first tries, retry after 10 seconds, the 5 next
  tries, retry after 1 minutes, ...
- Job properties: priorities, estimated time of arrival (ETA), custom
  description, number of retries
- Related Actions: link an action on the job view, such as open the
  record concerned by the job

Code Analysis

Views touched (14)
XML IDNameModelTypeStatus
view_queue_job_channel_form queue.job.channel.form queue.job.channel form New
view_queue_job_channel_search queue.job.channel.search queue.job.channel search New
view_queue_job_channel_tree queue.job.channel.tree queue.job.channel tree New
view_queue_job_form queue.job.form queue.job form New
view_queue_job_function_form queue.job.function.form queue.job.function form New
view_queue_job_function_search queue.job.function.search queue.job.function search New
view_queue_job_function_tree queue.job.function.tree queue.job.function tree New
view_queue_job_graph queue.job.graph queue.job graph New
view_queue_job_pivot queue.job.pivot queue.job pivot New
view_queue_job_search queue.job.search queue.job search New
view_queue_job_tree queue.job.tree queue.job tree New
view_requeue_job Requeue Jobs queue.requeue.job form New
view_set_jobs_cancelled Cancel Jobs queue.jobs.to.cancelled form New
view_set_jobs_done Set Jobs to Done queue.jobs.to.done form New
Models touched (9)

New fields (0)

No new fields.

Public methods (2)
  • delayable(self, priority=None, eta=None, max_retries=None, description=None, channel=None, identity_key=None)
    Return a ``Delayable`` The returned instance allows to enqueue any method of the recordset's Model. Usage:: delayable = self.env["res.users"].browse(10).delayable(priority=20) delayable.do_work(name="test"}).delay() In this example, the ``do_work`` method will not be executed directly. It will be executed in an asynchronous job. Method calls on a Delayable generally return themselves, so calls can be chained together:: delayable.set(priority=15).do_work(name="test"}).delay() The order of the calls that build the job is not relevant, beside the call to ``delay()`` that must happen at the very end. This is equivalent to the example above:: delayable.do_work(name="test"}).set(priority=15).delay() Very importantly, ``delay()`` must be called on the top-most parent of a chain of jobs, so if you have this:: job1 = record1.delayable().do_work() job2 = record2.delayable().do_work() job1.on_done(job2) The ``delay()`` call must be made on ``job1``, otherwise ``job2`` will be delayed, but ``job1`` will never be. When done on ``job1``, the ``delay()`` call will traverse the graph of jobs and delay all of them:: job1.delay() For more details on the graph dependencies, read the documentation of :module:`~odoo.addons.queue_job.delay`. :param priority: Priority of the job, 0 being the higher priority. Default is 10. :param eta: Estimated Time of Arrival of the job. It will not be executed before this date/time. :param max_retries: maximum number of retries before giving up and set the job state to 'failed'. A value of 0 means infinite retries. Default is 5. :param description: human description of the job. If None, description is computed from the function doc or name :param channel: the complete name of the channel to use to process the function. If specified it overrides the one defined on the function :param identity_key: key uniquely identifying the job, if specified and a job with the same key has not yet been run, the new job will not be added. It is either a string, either a function that takes the job as argument (see :py:func:`..job.identity_exact`). the new job will not be added. :return: instance of a Delayable :rtype: :class:`odoo.addons.queue_job.job.Delayable`
  • with_delay(self, priority=None, eta=None, max_retries=None, description=None, channel=None, identity_key=None)
    Return a ``DelayableRecordset`` It is a shortcut for the longer form as shown below:: self.with_delay(priority=20).action_done() # is equivalent to: self.delayable().set(priority=20).action_done().delay() ``with_delay()`` accepts job properties which specify how the job will be executed. Usage with job properties:: env['a.model'].with_delay(priority=30, eta=60*60*5).action_done() delayable.export_one_thing(the_thing_to_export) # => the job will be executed with a low priority and not before a # delay of 5 hours from now When using :meth:``with_delay``, the final ``delay()`` is implicit. See the documentation of :meth:``delayable`` for more details. :return: instance of a DelayableRecordset :rtype: :class:`odoo.addons.queue_job.job.DelayableRecordset`

New fields (1)
  • ttype Selection
    ondelete={'job_serialized': 'cascade'} selection_add=[('job_serialized', 'Job Serialized')]
Public methods (0)

No public methods.

New fields (29)
  • channel Char
    index=True
  • channel_method_name Char
    readonly=True string='Complete Method Name'
  • company_id Many2one → res.company
    comodel_name='res.company' index=True string='Company'
  • date_cancelled Datetime
    readonly=True
  • date_created Datetime
    readonly=True string='Created Date'
  • date_done Datetime
    readonly=True
  • date_enqueued Datetime
    readonly=True string='Enqueue Time'
  • date_started Datetime
    readonly=True string='Start Date'
  • eta Datetime
    string='Execute only after'
  • exc_info Text
    readonly=True string='Exception Info'
  • exc_message Char
    readonly=True string='Exception Message' tracking=True
  • exc_name Char
    readonly=True string='Exception'
  • exec_time Float
    group_operator='avg' help='Time required to execute this job in seconds. Average when grouped.' string='Execution Time (avg)'
  • func_string Char
    readonly=True string='Task'
  • graph_jobs_count Integer
    compute='_compute_graph_jobs_count'
  • graph_uuid Char
    help='Single shared identifier of a Graph. Empty for a single job.' index=True readonly=True string='Graph UUID'
  • identity_key Char
    readonly=True
  • job_function_id Many2one → queue.job.function
    comodel_name='queue.job.function' readonly=True string='Job Function'
  • max_retries Integer
    help='The job will fail if the number of tries reach the max. retries.\nRetries are infinite when empty.' string='Max. retries'
  • method_name Char
    readonly=True
  • model_name Char
    readonly=True string='Model'
  • name Char
    readonly=True string='Description'
  • priority Integer
    group_operator=False
  • result Text
    readonly=True
  • retry Integer
    string='Current try'
  • state Selection
    index=True readonly=True required=True args: STATES
  • user_id Many2one → res.users
    comodel_name='res.users' string='User ID'
  • uuid Char
    index=True readonly=True required=True string='UUID'
  • worker_pid Integer
    readonly=True
Public methods (10)
  • autovacuum(self)
    Delete all jobs done based on the removal interval defined on the channel Called from a cron.
  • button_cancelled(self)
  • button_done(self)
  • create(self, vals_list)
    @api.model_create_multi
  • init(self)
  • open_graph_jobs(self)
    Return action that opens all jobs of the same graph
  • open_related_action(self)
    Open the related action associated to the job
  • related_action_open_record(self)
    Open a form view with the record(s) of the job. For instance, for a job on a ``product.product``, it will open a ``product.product`` form view with the product record(s) concerned by the job. If the job concerns more than one record, it opens them in a list. This is the default related action.
  • requeue(self)
  • write(self, vals)

New fields (5)
  • complete_name Char
    compute='_compute_complete_name' readonly=True recursive=True store=True
  • job_function_ids One2many → queue.job.function
    comodel_name='queue.job.function' inverse_name='channel_id' string='Job Functions'
  • name Char
  • parent_id Many2one → queue.job.channel
    comodel_name='queue.job.channel' ondelete='restrict' string='Parent Channel'
  • removal_interval Integer
    default=<expr> required=True
Public methods (4)
  • create(self, vals_list)
    @api.model_create_multi
  • parent_required(self)
    @api.constrains('parent_id', 'name')
  • unlink(self)
  • write(self, values)

New fields (7)
  • channel Char
    readonly=True related='channel_id.complete_name' store=True
  • channel_id Many2one → queue.job.channel
    comodel_name='queue.job.channel' default=<expr> required=True string='Channel'
  • edit_related_action Text
    compute='_compute_edit_related_action' help='The action when the button *Related Action* is used on a job. The default action is to open the view of the record related to the job. Configured as a dictionary with optional keys: enable, func_name, kwargs.\nSee the module description for details.' inverse='_inverse_edit_related_action' string='Related Action'
  • edit_retry_pattern Text
    compute='_compute_edit_retry_pattern' help='Pattern expressing from the count of retries on retryable errors, the number of of seconds to postpone the next execution. Setting the number of seconds to a 2-element tuple or list will randomize the retry interval between the 2 values.\nExample: {1: 10, 5: 20, 10: 30, 15: 300}.\nExample: {1: (1, 10), 5: (11, 20), 10: (21, 30), 15: (100, 300)}.\nSee the module description for details.' inverse='_inverse_edit_retry_pattern' string='Retry Pattern'
  • method Char
  • model_id Many2one → ir.model
    comodel_name='ir.model' ondelete='cascade' string='Model'
  • name Char
    compute='_compute_name' index=True inverse='_inverse_name' store=True
Public methods (6)
  • create(self, vals_list)
    @api.model_create_multi
  • job_config(self, name)
    @tools.ormcache('name')
  • job_default_config(self)
  • job_function_name(model_name, method_name)
    @staticmethod
  • unlink(self)
  • write(self, values)

New fields (1)
  • queue_job_id Many2one → queue.job
    comodel_name='queue.job' index=True ondelete='cascade' required=True
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • set_cancelled(self)

New fields (0)

No new fields.

Public methods (1)
  • set_done(self)

New fields (1)
  • job_ids Many2many → queue.job
    comodel_name='queue.job' default=<expr> string='Jobs'
Public methods (1)
  • requeue(self)
REPOSITORY
REPOSITORYOCA/queue
GIT
GIThttps://github.com/OCA/queue.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/queue/tree/16.0/queue_job
VERSION
VERSION 3.0.1
CATEGORY
CATEGORYGeneric Modules
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Camptocamp, ACSONE SA/NV
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Camptocamp, ACSONE SA/NV
COMMITTERS
COMMITTERSStéphane Bidoul, Guewen Baconnier, Alexandre Fayolle, Stefan Rijnhart, GitHub, Jairo Llopis, Laurent Mignon (ACSONE), Denis Roussel, Enric Tobella, Florent Xicluna, Miquel Raïch, Sébastien Alix, Thomas Binsfeld, Hugo Santos, Florian da Costa, Weblate, OCA-git-bot, Simone Orsi, Tom, oca-ci, Benoit Aimont, Eduardo De Miguel, duongtq, Zina Rasoamanana, François Degrave, Florian Mounier, thien, Simó Albert i Beltran, pol, Bastian Guenther, Ross Golder
WEBSITE
WEBSITEhttps://github.com/OCA/queue
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:53:50
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - mail
    - base
    - base_setup
    - web
    - bus
    - web_tour
    - base_sparse_field
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES requests
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (14)
XML IDNameModelTypeStatus
view_queue_job_channel_form queue.job.channel.form queue.job.channel form New
view_queue_job_channel_search queue.job.channel.search queue.job.channel search New
view_queue_job_channel_tree queue.job.channel.tree queue.job.channel tree New
view_queue_job_form queue.job.form queue.job form New
view_queue_job_function_form queue.job.function.form queue.job.function form New
view_queue_job_function_search queue.job.function.search queue.job.function search New
view_queue_job_function_tree queue.job.function.tree queue.job.function tree New
view_queue_job_graph queue.job.graph queue.job graph New
view_queue_job_pivot queue.job.pivot queue.job pivot New
view_queue_job_search queue.job.search queue.job search New
view_queue_job_tree queue.job.tree queue.job tree New
view_requeue_job Requeue Jobs queue.requeue.job form New
view_set_jobs_cancelled Cancel Jobs queue.jobs.to.cancelled form New
view_set_jobs_done Set Jobs to Done queue.jobs.to.done form New
Models touched (9)

New fields (0)

No new fields.

Public methods (2)
  • delayable(self, priority=None, eta=None, max_retries=None, description=None, channel=None, identity_key=None)
    Return a ``Delayable`` The returned instance allows to enqueue any method of the recordset's Model. Usage:: delayable = self.env["res.users"].browse(10).delayable(priority=20) delayable.do_work(name="test"}).delay() In this example, the ``do_work`` method will not be executed directly. It will be executed in an asynchronous job. Method calls on a Delayable generally return themselves, so calls can be chained together:: delayable.set(priority=15).do_work(name="test"}).delay() The order of the calls that build the job is not relevant, beside the call to ``delay()`` that must happen at the very end. This is equivalent to the example above:: delayable.do_work(name="test"}).set(priority=15).delay() Very importantly, ``delay()`` must be called on the top-most parent of a chain of jobs, so if you have this:: job1 = record1.delayable().do_work() job2 = record2.delayable().do_work() job1.on_done(job2) The ``delay()`` call must be made on ``job1``, otherwise ``job2`` will be delayed, but ``job1`` will never be. When done on ``job1``, the ``delay()`` call will traverse the graph of jobs and delay all of them:: job1.delay() For more details on the graph dependencies, read the documentation of :module:`~odoo.addons.queue_job.delay`. :param priority: Priority of the job, 0 being the higher priority. Default is 10. :param eta: Estimated Time of Arrival of the job. It will not be executed before this date/time. :param max_retries: maximum number of retries before giving up and set the job state to 'failed'. A value of 0 means infinite retries. Default is 5. :param description: human description of the job. If None, description is computed from the function doc or name :param channel: the complete name of the channel to use to process the function. If specified it overrides the one defined on the function :param identity_key: key uniquely identifying the job, if specified and a job with the same key has not yet been run, the new job will not be added. It is either a string, either a function that takes the job as argument (see :py:func:`..job.identity_exact`). the new job will not be added. :return: instance of a Delayable :rtype: :class:`odoo.addons.queue_job.job.Delayable`
  • with_delay(self, priority=None, eta=None, max_retries=None, description=None, channel=None, identity_key=None)
    Return a ``DelayableRecordset`` It is a shortcut for the longer form as shown below:: self.with_delay(priority=20).action_done() # is equivalent to: self.delayable().set(priority=20).action_done().delay() ``with_delay()`` accepts job properties which specify how the job will be executed. Usage with job properties:: env['a.model'].with_delay(priority=30, eta=60*60*5).action_done() delayable.export_one_thing(the_thing_to_export) # => the job will be executed with a low priority and not before a # delay of 5 hours from now When using :meth:``with_delay``, the final ``delay()`` is implicit. See the documentation of :meth:``delayable`` for more details. :return: instance of a DelayableRecordset :rtype: :class:`odoo.addons.queue_job.job.DelayableRecordset`

New fields (1)
  • ttype Selection
    ondelete={'job_serialized': 'cascade'} selection_add=[('job_serialized', 'Job Serialized')]
Public methods (0)

No public methods.

New fields (29)
  • channel Char
    index=True
  • channel_method_name Char
    readonly=True string='Complete Method Name'
  • company_id Many2one → res.company
    comodel_name='res.company' index=True string='Company'
  • date_cancelled Datetime
    readonly=True
  • date_created Datetime
    readonly=True string='Created Date'
  • date_done Datetime
    readonly=True
  • date_enqueued Datetime
    readonly=True string='Enqueue Time'
  • date_started Datetime
    readonly=True string='Start Date'
  • eta Datetime
    string='Execute only after'
  • exc_info Text
    readonly=True string='Exception Info'
  • exc_message Char
    readonly=True string='Exception Message' tracking=True
  • exc_name Char
    readonly=True string='Exception'
  • exec_time Float
    group_operator='avg' help='Time required to execute this job in seconds. Average when grouped.' readonly=True string='Execution Time (avg)'
  • func_string Char
    readonly=True string='Task'
  • graph_jobs_count Integer
    compute='_compute_graph_jobs_count'
  • graph_uuid Char
    help='Single shared identifier of a Graph. Empty for a single job.' index=True readonly=True string='Graph UUID'
  • identity_key Char
    readonly=True
  • job_function_id Many2one → queue.job.function
    comodel_name='queue.job.function' readonly=True string='Job Function'
  • max_retries Integer
    help='The job will fail if the number of tries reach the max. retries.\nRetries are infinite when empty.' string='Max. retries'
  • method_name Char
    readonly=True
  • model_name Char
    readonly=True string='Model'
  • name Char
    readonly=True string='Description'
  • priority Integer
    group_operator=False
  • result Text
    readonly=True
  • retry Integer
    string='Current try'
  • state Selection
    index=True readonly=True required=True args: STATES
  • user_id Many2one → res.users
    comodel_name='res.users' string='User ID'
  • uuid Char
    index=True readonly=True required=True string='UUID'
  • worker_pid Integer
    readonly=True
Public methods (10)
  • autovacuum(self)
    Delete all jobs done based on the removal interval defined on the channel Called from a cron.
  • button_cancelled(self)
  • button_done(self)
  • create(self, vals_list)
    @api.model_create_multi
  • init(self)
  • open_graph_jobs(self)
    Return action that opens all jobs of the same graph
  • open_related_action(self)
    Open the related action associated to the job
  • related_action_open_record(self)
    Open a form view with the record(s) of the job. For instance, for a job on a ``product.product``, it will open a ``product.product`` form view with the product record(s) concerned by the job. If the job concerns more than one record, it opens them in a list. This is the default related action.
  • requeue(self)
  • write(self, vals)

New fields (5)
  • complete_name Char
    compute='_compute_complete_name' readonly=True recursive=True store=True
  • job_function_ids One2many → queue.job.function
    comodel_name='queue.job.function' inverse_name='channel_id' string='Job Functions'
  • name Char
  • parent_id Many2one → queue.job.channel
    comodel_name='queue.job.channel' ondelete='restrict' string='Parent Channel'
  • removal_interval Integer
    default=<expr> required=True
Public methods (5)
  • create(self, vals_list)
    @api.model_create_multi
  • name_get(self)
  • parent_required(self)
    @api.constrains('parent_id', 'name')
  • unlink(self)
  • write(self, values)

New fields (8)
  • allow_commit Boolean
    help='Allows the job to commit transactions during execution. Under the hood, this executes the job in a new database cursor, which incurs an overhead as it requires an extra connection to the database. '
  • channel Char
    readonly=True related='channel_id.complete_name' store=True
  • channel_id Many2one → queue.job.channel
    comodel_name='queue.job.channel' default=<expr> required=True string='Channel'
  • edit_related_action Text
    compute='_compute_edit_related_action' help='The action when the button *Related Action* is used on a job. The default action is to open the view of the record related to the job. Configured as a dictionary with optional keys: enable, func_name, kwargs.\nSee the module description for details.' inverse='_inverse_edit_related_action' string='Related Action'
  • edit_retry_pattern Text
    compute='_compute_edit_retry_pattern' help='Pattern expressing from the count of retries on retryable errors, the number of of seconds to postpone the next execution. Setting the number of seconds to a 2-element tuple or list will randomize the retry interval between the 2 values.\nExample: {1: 10, 5: 20, 10: 30, 15: 300}.\nExample: {1: (1, 10), 5: (11, 20), 10: (21, 30), 15: (100, 300)}.\nSee the module description for details.' inverse='_inverse_edit_retry_pattern' string='Retry Pattern'
  • method Char
  • model_id Many2one → ir.model
    comodel_name='ir.model' ondelete='cascade' string='Model'
  • name Char
    compute='_compute_name' index=True inverse='_inverse_name' store=True
Public methods (6)
  • create(self, vals_list)
    @api.model_create_multi
  • job_config(self, name)
    @tools.ormcache('name')
  • job_default_config(self)
  • job_function_name(model_name, method_name)
    @staticmethod
  • unlink(self)
  • write(self, values)

New fields (1)
  • queue_job_id Many2one → queue.job
    comodel_name='queue.job' index=True ondelete='cascade' required=True
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • set_cancelled(self)

New fields (0)

No new fields.

Public methods (1)
  • set_done(self)

New fields (1)
  • job_ids Many2many → queue.job
    comodel_name='queue.job' default=<expr> string='Jobs'
Public methods (1)
  • requeue(self)
REPOSITORY
REPOSITORYOCA/queue
GIT
GIThttps://github.com/OCA/queue.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/queue/tree/15.0/queue_job
VERSION
VERSION 2.3.13
CATEGORY
CATEGORYGeneric Modules
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Camptocamp, ACSONE SA/NV
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Camptocamp, ACSONE SA/NV
COMMITTERS
COMMITTERSStéphane Bidoul, Guewen Baconnier, Alexandre Fayolle, GitHub, Jairo Llopis, Enric Tobella, Ivàn Todorovich, Florent Xicluna, OCA Transbot, Miquel Raïch, Sébastien Alix, Weblate, OCA-git-bot, Hans Henrik Gabelgaard, Simone Orsi, oca-ci, Adam Heinz, François Degrave, Simó Albert i Beltran, pcastelovigo
WEBSITE
WEBSITEhttps://github.com/OCA/queue
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:46:36
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - mail
    - base
    - base_setup
    - web
    - bus
    - web_tour
    - base_sparse_field
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES requests
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (14)
XML IDNameModelTypeStatus
view_queue_job_channel_form queue.job.channel.form queue.job.channel form New
view_queue_job_channel_search queue.job.channel.search queue.job.channel search New
view_queue_job_channel_tree queue.job.channel.tree queue.job.channel tree New
view_queue_job_form queue.job.form queue.job form New
view_queue_job_function_form queue.job.function.form queue.job.function form New
view_queue_job_function_search queue.job.function.search queue.job.function search New
view_queue_job_function_tree queue.job.function.tree queue.job.function tree New
view_queue_job_graph queue.job.graph queue.job graph New
view_queue_job_pivot queue.job.pivot queue.job pivot New
view_queue_job_search queue.job.search queue.job search New
view_queue_job_tree queue.job.tree queue.job tree New
view_requeue_job Requeue Jobs queue.requeue.job form New
view_set_jobs_cancelled Cancel Jobs queue.jobs.to.cancelled form New
view_set_jobs_done Set Jobs to Done queue.jobs.to.done form New
Models touched (8)

New fields (0)

No new fields.

Public methods (2)
  • delayable(self, priority=None, eta=None, max_retries=None, description=None, channel=None, identity_key=None)
    Return a ``Delayable`` The returned instance allows to enqueue any method of the recordset's Model. Usage:: delayable = self.env["res.users"].browse(10).delayable(priority=20) delayable.do_work(name="test"}).delay() In this example, the ``do_work`` method will not be executed directly. It will be executed in an asynchronous job. Method calls on a Delayable generally return themselves, so calls can be chained together:: delayable.set(priority=15).do_work(name="test"}).delay() The order of the calls that build the job is not relevant, beside the call to ``delay()`` that must happen at the very end. This is equivalent to the example above:: delayable.do_work(name="test"}).set(priority=15).delay() Very importantly, ``delay()`` must be called on the top-most parent of a chain of jobs, so if you have this:: job1 = record1.delayable().do_work() job2 = record2.delayable().do_work() job1.on_done(job2) The ``delay()`` call must be made on ``job1``, otherwise ``job2`` will be delayed, but ``job1`` will never be. When done on ``job1``, the ``delay()`` call will traverse the graph of jobs and delay all of them:: job1.delay() For more details on the graph dependencies, read the documentation of :module:`~odoo.addons.queue_job.delay`. :param priority: Priority of the job, 0 being the higher priority. Default is 10. :param eta: Estimated Time of Arrival of the job. It will not be executed before this date/time. :param max_retries: maximum number of retries before giving up and set the job state to 'failed'. A value of 0 means infinite retries. Default is 5. :param description: human description of the job. If None, description is computed from the function doc or name :param channel: the complete name of the channel to use to process the function. If specified it overrides the one defined on the function :param identity_key: key uniquely identifying the job, if specified and a job with the same key has not yet been run, the new job will not be added. It is either a string, either a function that takes the job as argument (see :py:func:`..job.identity_exact`). the new job will not be added. :return: instance of a Delayable :rtype: :class:`odoo.addons.queue_job.job.Delayable`
  • with_delay(self, priority=None, eta=None, max_retries=None, description=None, channel=None, identity_key=None)
    Return a ``DelayableRecordset`` It is a shortcut for the longer form as shown below:: self.with_delay(priority=20).action_done() # is equivalent to: self.delayable().set(priority=20).action_done().delay() ``with_delay()`` accepts job properties which specify how the job will be executed. Usage with job properties:: env['a.model'].with_delay(priority=30, eta=60*60*5).action_done() delayable.export_one_thing(the_thing_to_export) # => the job will be executed with a low priority and not before a # delay of 5 hours from now When using :meth:``with_delay``, the final ``delay()`` is implicit. See the documentation of :meth:``delayable`` for more details. :return: instance of a DelayableRecordset :rtype: :class:`odoo.addons.queue_job.job.DelayableRecordset`

New fields (1)
  • ttype Selection
    ondelete={'job_serialized': 'cascade'} selection_add=[('job_serialized', 'Job Serialized')]
Public methods (0)

No public methods.

New fields (29)
  • channel Char
    index=True
  • channel_method_name Char
    readonly=True string='Complete Method Name'
  • company_id Many2one → res.company
    comodel_name='res.company' index=True string='Company'
  • date_cancelled Datetime
    readonly=True
  • date_created Datetime
    readonly=True string='Created Date'
  • date_done Datetime
    readonly=True
  • date_enqueued Datetime
    readonly=True string='Enqueue Time'
  • date_started Datetime
    readonly=True string='Start Date'
  • eta Datetime
    string='Execute only after'
  • exc_info Text
    readonly=True string='Exception Info'
  • exc_message Char
    readonly=True string='Exception Message' tracking=True
  • exc_name Char
    readonly=True string='Exception'
  • exec_time Float
    group_operator='avg' help='Time required to execute this job in seconds. Average when grouped.' string='Execution Time (avg)'
  • func_string Char
    readonly=True string='Task'
  • graph_jobs_count Integer
    compute='_compute_graph_jobs_count'
  • graph_uuid Char
    help='Single shared identifier of a Graph. Empty for a single job.' index=True readonly=True string='Graph UUID'
  • identity_key Char
    readonly=True
  • job_function_id Many2one → queue.job.function
    comodel_name='queue.job.function' readonly=True string='Job Function'
  • max_retries Integer
    help='The job will fail if the number of tries reach the max. retries.\nRetries are infinite when empty.' string='Max. retries'
  • method_name Char
    readonly=True
  • model_name Char
    readonly=True string='Model'
  • name Char
    readonly=True string='Description'
  • priority Integer
  • result Text
    readonly=True
  • retry Integer
    string='Current try'
  • state Selection
    index=True readonly=True required=True args: STATES
  • user_id Many2one → res.users
    comodel_name='res.users' string='User ID'
  • uuid Char
    index=True readonly=True required=True string='UUID'
  • worker_pid Integer
    readonly=True
Public methods (11)
  • autovacuum(self)
    Delete all jobs done based on the removal interval defined on the channel Called from a cron.
  • button_cancelled(self)
  • button_done(self)
  • create(self, vals_list)
    @api.model_create_multi
  • init(self)
  • open_graph_jobs(self)
    Return action that opens all jobs of the same graph
  • open_related_action(self)
    Open the related action associated to the job
  • related_action_open_record(self)
    Open a form view with the record(s) of the job. For instance, for a job on a ``product.product``, it will open a ``product.product`` form view with the product record(s) concerned by the job. If the job concerns more than one record, it opens them in a list. This is the default related action.
  • requeue(self)
  • requeue_stuck_jobs(self, enqueued_delta=1, started_delta=0)
    Fix jobs that are in a bad states :param in_queue_delta: lookup time in minutes for jobs that are in enqueued state, 0 means that it is not checked :param started_delta: lookup time in minutes for jobs that are in started state, 0 means that it is not checked, -1 will use `--limit-time-real` config value
  • write(self, vals)

New fields (5)
  • complete_name Char
    compute='_compute_complete_name' readonly=True recursive=True store=True
  • job_function_ids One2many → queue.job.function
    comodel_name='queue.job.function' inverse_name='channel_id' string='Job Functions'
  • name Char
  • parent_id Many2one → queue.job.channel
    comodel_name='queue.job.channel' ondelete='restrict' string='Parent Channel'
  • removal_interval Integer
    default=<expr> required=True
Public methods (5)
  • create(self, vals_list)
    @api.model_create_multi
  • name_get(self)
  • parent_required(self)
    @api.constrains('parent_id', 'name')
  • unlink(self)
  • write(self, values)

New fields (7)
  • channel Char
    readonly=True related='channel_id.complete_name' store=True
  • channel_id Many2one → queue.job.channel
    comodel_name='queue.job.channel' default=<expr> required=True string='Channel'
  • edit_related_action Text
    compute='_compute_edit_related_action' help='The action when the button *Related Action* is used on a job. The default action is to open the view of the record related to the job. Configured as a dictionary with optional keys: enable, func_name, kwargs.\nSee the module description for details.' inverse='_inverse_edit_related_action' string='Related Action'
  • edit_retry_pattern Text
    compute='_compute_edit_retry_pattern' help='Pattern expressing from the count of retries on retryable errors, the number of of seconds to postpone the next execution. Setting the number of seconds to a 2-element tuple or list will randomize the retry interval between the 2 values.\nExample: {1: 10, 5: 20, 10: 30, 15: 300}.\nExample: {1: (1, 10), 5: (11, 20), 10: (21, 30), 15: (100, 300)}.\nSee the module description for details.' inverse='_inverse_edit_retry_pattern' string='Retry Pattern'
  • method Char
  • model_id Many2one → ir.model
    comodel_name='ir.model' ondelete='cascade' string='Model'
  • name Char
    compute='_compute_name' index=True inverse='_inverse_name' store=True
Public methods (6)
  • create(self, vals_list)
    @api.model_create_multi
  • job_config(self, name)
    @tools.ormcache('name')
  • job_default_config(self)
  • job_function_name(model_name, method_name)
    @staticmethod
  • unlink(self)
  • write(self, values)

New fields (0)

No new fields.

Public methods (1)
  • set_cancelled(self)

New fields (0)

No new fields.

Public methods (1)
  • set_done(self)

New fields (1)
  • job_ids Many2many → queue.job
    comodel_name='queue.job' default=<expr> string='Jobs'
Public methods (1)
  • requeue(self)
REPOSITORY
REPOSITORYOCA/queue
GIT
GIThttps://github.com/OCA/queue.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/queue/tree/14.0/queue_job
VERSION
VERSION 3.15.1
CATEGORY
CATEGORYGeneric Modules
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Camptocamp, ACSONE SA/NV
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Camptocamp, ACSONE SA/NV
COMMITTERS
COMMITTERSStéphane Bidoul, Guewen Baconnier, Sylvain LE GAL, GitHub, Moisés López, Enric Tobella, Yann Papouin, Pierre Verkest, Florent Xicluna, OCA Transbot, Miquel Raïch, Víctor Martínez, Sébastien Alix, Sébastien BEAU, Florian da Costa, oca-travis, Weblate, OCA-git-bot, Simone Orsi, hparfr, Pieter Paulussen, François Honoré, Fernanda Hernández, oca-ci, davidborromeo, David James, fshah, Hai Lang, oca-git-bot, Núria Sancho, Dũng (Trần Đình), Florian Mounier, Ashish Hirpara, Quoc Duong, inigogr, Edi Santoso, Simó Albert i Beltran
WEBSITE
WEBSITEhttps://github.com/OCA/queue
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:41:03
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - mail
    - base
    - base_setup
    - web
    - bus
    - web_tour
    - base_sparse_field
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES requests
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (15)
XML IDNameModelTypeStatus
queue_job_assets queue.job.assets ir.ui.view qweb Inherits web.assets_backend
view_queue_job_channel_form queue.job.channel.form queue.job.channel form New
view_queue_job_channel_search queue.job.channel.search queue.job.channel search New
view_queue_job_channel_tree queue.job.channel.tree queue.job.channel tree New
view_queue_job_form queue.job.form queue.job form New
view_queue_job_function_form queue.job.function.form queue.job.function form New
view_queue_job_function_search queue.job.function.search queue.job.function search New
view_queue_job_function_tree queue.job.function.tree queue.job.function tree New
view_queue_job_graph queue.job.graph queue.job graph New
view_queue_job_pivot queue.job.pivot queue.job pivot New
view_queue_job_search queue.job.search queue.job search New
view_queue_job_tree queue.job.tree queue.job tree New
view_requeue_job Requeue Jobs queue.requeue.job form New
view_set_jobs_cancelled Cancel Jobs queue.jobs.to.cancelled form New
view_set_jobs_done Set Jobs to Done queue.jobs.to.done form New
Models touched (8)

New fields (0)

No new fields.

Public methods (2)
  • delayable(self, priority=None, eta=None, max_retries=None, description=None, channel=None, identity_key=None)
    Return a ``Delayable`` The returned instance allows to enqueue any method of the recordset's Model. Usage:: delayable = self.env["res.users"].browse(10).delayable(priority=20) delayable.do_work(name="test"}).delay() In this example, the ``do_work`` method will not be executed directly. It will be executed in an asynchronous job. Method calls on a Delayable generally return themselves, so calls can be chained together:: delayable.set(priority=15).do_work(name="test"}).delay() The order of the calls that build the job is not relevant, beside the call to ``delay()`` that must happen at the very end. This is equivalent to the example above:: delayable.do_work(name="test"}).set(priority=15).delay() Very importantly, ``delay()`` must be called on the top-most parent of a chain of jobs, so if you have this:: job1 = record1.delayable().do_work() job2 = record2.delayable().do_work() job1.on_done(job2) The ``delay()`` call must be made on ``job1``, otherwise ``job2`` will be delayed, but ``job1`` will never be. When done on ``job1``, the ``delay()`` call will traverse the graph of jobs and delay all of them:: job1.delay() For more details on the graph dependencies, read the documentation of :module:`~odoo.addons.queue_job.delay`. :param priority: Priority of the job, 0 being the higher priority. Default is 10. :param eta: Estimated Time of Arrival of the job. It will not be executed before this date/time. :param max_retries: maximum number of retries before giving up and set the job state to 'failed'. A value of 0 means infinite retries. Default is 5. :param description: human description of the job. If None, description is computed from the function doc or name :param channel: the complete name of the channel to use to process the function. If specified it overrides the one defined on the function :param identity_key: key uniquely identifying the job, if specified and a job with the same key has not yet been run, the new job will not be added. It is either a string, either a function that takes the job as argument (see :py:func:`..job.identity_exact`). the new job will not be added. :return: instance of a Delayable :rtype: :class:`odoo.addons.queue_job.job.Delayable`
  • with_delay(self, priority=None, eta=None, max_retries=None, description=None, channel=None, identity_key=None)
    Return a ``DelayableRecordset`` It is a shortcut for the longer form as shown below:: self.with_delay(priority=20).action_done() # is equivalent to: self.delayable().set(priority=20).action_done().delay() ``with_delay()`` accepts job properties which specify how the job will be executed. Usage with job properties:: env['a.model'].with_delay(priority=30, eta=60*60*5).action_done() delayable.export_one_thing(the_thing_to_export) # => the job will be executed with a low priority and not before a # delay of 5 hours from now When using :meth:``with_delay``, the final ``delay()`` is implicit. See the documentation of :meth:``delayable`` for more details. :return: instance of a DelayableRecordset :rtype: :class:`odoo.addons.queue_job.job.DelayableRecordset`

New fields (1)
  • ttype Selection
    ondelete={'job_serialized': 'cascade'} selection_add=[('job_serialized', 'Job Serialized')]
Public methods (0)

No public methods.

New fields (29)
  • channel Char
    index=True
  • channel_method_name Char
    readonly=True string='Complete Method Name'
  • company_id Many2one → res.company
    comodel_name='res.company' index=True string='Company'
  • date_cancelled Datetime
    readonly=True
  • date_created Datetime
    readonly=True string='Created Date'
  • date_done Datetime
    readonly=True
  • date_enqueued Datetime
    readonly=True string='Enqueue Time'
  • date_started Datetime
    readonly=True string='Start Date'
  • eta Datetime
    string='Execute only after'
  • exc_info Text
    readonly=True string='Exception Info'
  • exc_message Char
    readonly=True string='Exception Message' tracking=True
  • exc_name Char
    readonly=True string='Exception'
  • exec_time Float
    group_operator='avg' help='Time required to execute this job in seconds. Average when grouped.' string='Execution Time (avg)'
  • func_string Char
    readonly=True string='Task'
  • graph_jobs_count Integer
    compute='_compute_graph_jobs_count'
  • graph_uuid Char
    help='Single shared identifier of a Graph. Empty for a single job.' index=True readonly=True string='Graph UUID'
  • identity_key Char
    readonly=True
  • job_function_id Many2one → queue.job.function
    comodel_name='queue.job.function' readonly=True string='Job Function'
  • max_retries Integer
    help='The job will fail if the number of tries reach the max. retries.\nRetries are infinite when empty.' string='Max. retries'
  • method_name Char
    readonly=True
  • model_name Char
    readonly=True string='Model'
  • name Char
    readonly=True string='Description'
  • priority Integer
    group_operator=False
  • result Text
    readonly=True
  • retry Integer
    string='Current try'
  • state Selection
    index=True readonly=True required=True args: STATES
  • user_id Many2one → res.users
    comodel_name='res.users' string='User ID'
  • uuid Char
    index=True readonly=True required=True string='UUID'
  • worker_pid Integer
    readonly=True
Public methods (11)
  • autovacuum(self)
    Delete all jobs done based on the removal interval defined on the channel Called from a cron.
  • button_cancelled(self)
  • button_done(self)
  • create(self, vals_list)
    @api.model_create_multi
  • init(self)
  • open_graph_jobs(self)
    Return action that opens all jobs of the same graph
  • open_related_action(self)
    Open the related action associated to the job
  • related_action_open_record(self)
    Open a form view with the record(s) of the job. For instance, for a job on a ``product.product``, it will open a ``product.product`` form view with the product record(s) concerned by the job. If the job concerns more than one record, it opens them in a list. This is the default related action.
  • requeue(self)
  • requeue_stuck_jobs(self, enqueued_delta=5, started_delta=0)
    Fix jobs that are in a bad states :param in_queue_delta: lookup time in minutes for jobs that are in enqueued state :param started_delta: lookup time in minutes for jobs that are in enqueued state, 0 means that it is not checked
  • write(self, vals)

New fields (5)
  • complete_name Char
    compute='_compute_complete_name' readonly=True store=True
  • job_function_ids One2many → queue.job.function
    comodel_name='queue.job.function' inverse_name='channel_id' string='Job Functions'
  • name Char
  • parent_id Many2one → queue.job.channel
    comodel_name='queue.job.channel' ondelete='restrict' string='Parent Channel'
  • removal_interval Integer
    default=<expr> required=True
Public methods (5)
  • create(self, vals_list)
    @api.model_create_multi
  • name_get(self)
  • parent_required(self)
    @api.constrains('parent_id', 'name')
  • unlink(self)
  • write(self, values)

New fields (7)
  • channel Char
    readonly=True related='channel_id.complete_name' store=True
  • channel_id Many2one → queue.job.channel
    comodel_name='queue.job.channel' default=<expr> required=True string='Channel'
  • edit_related_action Text
    compute='_compute_edit_related_action' help='The action when the button *Related Action* is used on a job. The default action is to open the view of the record related to the job. Configured as a dictionary with optional keys: enable, func_name, kwargs.\nSee the module description for details.' inverse='_inverse_edit_related_action' string='Related Action'
  • edit_retry_pattern Text
    compute='_compute_edit_retry_pattern' help='Pattern expressing from the count of retries on retryable errors, the number of of seconds to postpone the next execution. Setting the number of seconds to a 2-element tuple or list will randomize the retry interval between the 2 values.\nExample: {1: 10, 5: 20, 10: 30, 15: 300}.\nExample: {1: (1, 10), 5: (11, 20), 10: (21, 30), 15: (100, 300)}.\nSee the module description for details.' inverse='_inverse_edit_retry_pattern' string='Retry Pattern'
  • method Char
  • model_id Many2one → ir.model
    comodel_name='ir.model' ondelete='cascade' string='Model'
  • name Char
    compute='_compute_name' index=True inverse='_inverse_name' store=True
Public methods (6)
  • create(self, vals_list)
    @api.model_create_multi
  • job_config(self, name)
    @tools.ormcache('name')
  • job_default_config(self)
  • job_function_name(model_name, method_name)
    @staticmethod
  • unlink(self)
  • write(self, values)

New fields (0)

No new fields.

Public methods (1)
  • set_cancelled(self)

New fields (0)

No new fields.

Public methods (1)
  • set_done(self)

New fields (1)
  • job_ids Many2many → queue.job
    comodel_name='queue.job' default=<expr> string='Jobs'
Public methods (1)
  • requeue(self)
REPOSITORY
REPOSITORYOCA/queue
GIT
GIThttps://github.com/OCA/queue.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/queue/tree/13.0/queue_job
VERSION
VERSION 3.11.3
CATEGORY
CATEGORYGeneric Modules
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Camptocamp, ACSONE SA/NV
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Camptocamp, ACSONE SA/NV
COMMITTERS
COMMITTERSStéphane Bidoul, Guewen Baconnier, Pedro M. Baeza, GitHub, Denis Roussel, Enric Tobella, Nils Hamerlinck, sbejaoui, OCA Transbot, Miquel Raïch, oca-travis, Weblate, OCA-git-bot, Miku Laitinen, Simone Orsi, Ethan Hildick, Jaime Arroyo, Tatiana Deribina, Paul, Eugene Molotov, Vincent Hatakeyama
WEBSITE
WEBSITEhttps://github.com/OCA/queue
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:34:15
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - mail
    - base
    - base_setup
    - web
    - bus
    - web_tour
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES requests
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (13)
XML IDNameModelTypeStatus
view_queue_job_channel_form queue.job.channel.form queue.job.channel form New
view_queue_job_channel_search queue.job.channel.search queue.job.channel search New
view_queue_job_channel_tree queue.job.channel.tree queue.job.channel tree New
view_queue_job_form queue.job.form queue.job form New
view_queue_job_function_form queue.job.function.form queue.job.function form New
view_queue_job_function_search queue.job.function.search queue.job.function search New
view_queue_job_function_tree queue.job.function.tree queue.job.function tree New
view_queue_job_graph queue.job.graph queue.job graph New
view_queue_job_pivot queue.job.pivot queue.job pivot New
view_queue_job_search queue.job.search queue.job search New
view_queue_job_tree queue.job.tree queue.job tree New
view_requeue_job Requeue Jobs queue.requeue.job form New
view_set_jobs_done Set Jobs to Done queue.jobs.to.done form New
Models touched (7)

New fields (0)

No new fields.

Public methods (1)
  • with_delay(self, priority=None, eta=None, max_retries=None, description=None, channel=None, identity_key=None)
    Return a ``DelayableRecordset`` The returned instance allows to enqueue any method of the recordset's Model. Usage:: self.env['res.users'].with_delay().write({'name': 'test'}) ``with_delay()`` accepts job properties which specify how the job will be executed. Usage with job properties:: delayable = env['a.model'].with_delay(priority=30, eta=60*60*5) delayable.export_one_thing(the_thing_to_export) # => the job will be executed with a low priority and not before a # delay of 5 hours from now :param priority: Priority of the job, 0 being the higher priority. Default is 10. :param eta: Estimated Time of Arrival of the job. It will not be executed before this date/time. :param max_retries: maximum number of retries before giving up and set the job state to 'failed'. A value of 0 means infinite retries. Default is 5. :param description: human description of the job. If None, description is computed from the function doc or name :param channel: the complete name of the channel to use to process the function. If specified it overrides the one defined on the function :param identity_key: key uniquely identifying the job, if specified and a job with the same key has not yet been run, the new job will not be added. It is either a string, either a function that takes the job as argument (see :py:func:`..job.identity_exact`). :return: instance of a DelayableRecordset :rtype: :class:`odoo.addons.queue_job.job.DelayableRecordset` Note for developers: if you want to run tests or simply disable jobs queueing for debugging purposes, you can: a. set the env var `TEST_QUEUE_JOB_NO_DELAY=1` b. pass a ctx key `test_queue_job_no_delay=1` In tests you'll have to mute the logger like: @mute_logger('odoo.addons.queue_job.models.base')

New fields (1)
  • ttype Selection
    selection_add=[('job_serialized', 'Job Serialized')]
Public methods (0)

No public methods.

New fields (26)
  • channel Char
    index=True
  • channel_method_name Char
    readonly=True
  • company_id Many2one → res.company
    comodel_name='res.company' index=True string='Company'
  • date_created Datetime
    readonly=True string='Created Date'
  • date_done Datetime
    readonly=True
  • date_enqueued Datetime
    readonly=True string='Enqueue Time'
  • date_started Datetime
    readonly=True string='Start Date'
  • eta Datetime
    string='Execute only after'
  • exc_info Text
    readonly=True string='Exception Info'
  • exc_message Char
    readonly=True string='Exception Message' tracking=True
  • exc_name Char
    readonly=True string='Exception'
  • exec_time Float
    group_operator='avg' help='Time required to execute this job in seconds. Average when grouped.' string='Execution Time (avg)'
  • func_string Char
    readonly=True string='Task'
  • identity_key Char
    readonly=True
  • job_function_id Many2one → queue.job.function
    comodel_name='queue.job.function' readonly=True string='Job Function'
  • max_retries Integer
    help='The job will fail if the number of tries reach the max. retries.\nRetries are infinite when empty.' string='Max. retries'
  • method_name Char
    readonly=True
  • model_name Char
    readonly=True string='Model'
  • name Char
    readonly=True string='Description'
  • priority Integer
  • result Text
    readonly=True
  • retry Integer
    string='Current try'
  • state Selection
    index=True readonly=True required=True args: STATES
  • user_id Many2one → res.users
    comodel_name='res.users' string='User ID'
  • uuid Char
    index=True readonly=True required=True string='UUID'
  • worker_pid Integer
    readonly=True
Public methods (9)
  • autovacuum(self)
    Delete all jobs done based on the removal interval defined on the channel Called from a cron.
  • button_done(self)
  • create(self, vals_list)
    @api.model_create_multi
  • init(self)
  • open_related_action(self)
    Open the related action associated to the job
  • related_action_open_record(self)
    Open a form view with the record(s) of the job. For instance, for a job on a ``product.product``, it will open a ``product.product`` form view with the product record(s) concerned by the job. If the job concerns more than one record, it opens them in a list. This is the default related action.
  • requeue(self)
  • requeue_stuck_jobs(self, enqueued_delta=5, started_delta=0)
    Fix jobs that are in a bad states :param in_queue_delta: lookup time in minutes for jobs that are in enqueued state :param started_delta: lookup time in minutes for jobs that are in enqueued state, 0 means that it is not checked
  • write(self, vals)

New fields (5)
  • complete_name Char
    compute='_compute_complete_name' readonly=True store=True
  • job_function_ids One2many → queue.job.function
    comodel_name='queue.job.function' inverse_name='channel_id' string='Job Functions'
  • name Char
  • parent_id Many2one → queue.job.channel
    comodel_name='queue.job.channel' ondelete='restrict' string='Parent Channel'
  • removal_interval Integer
    default=<expr> required=True
Public methods (5)
  • create(self, vals_list)
    @api.model_create_multi
  • name_get(self)
  • parent_required(self)
    @api.constrains('parent_id', 'name')
  • unlink(self)
  • write(self, values)

New fields (7)
  • channel Char
    readonly=True related='channel_id.complete_name' store=True
  • channel_id Many2one → queue.job.channel
    comodel_name='queue.job.channel' default=<expr> required=True string='Channel'
  • edit_related_action Text
    compute='_compute_edit_related_action' help='The action when the button *Related Action* is used on a job. The default action is to open the view of the record related to the job. Configured as a dictionary with optional keys: enable, func_name, kwargs.\nSee the module description for details.' inverse='_inverse_edit_related_action' string='Related Action'
  • edit_retry_pattern Text
    compute='_compute_edit_retry_pattern' help='Pattern expressing from the count of retries on retryable errors, the number of of seconds to postpone the next execution.\nExample: {1: 10, 5: 20, 10: 30, 15: 300}.\nSee the module description for details.' inverse='_inverse_edit_retry_pattern' string='Retry Pattern'
  • method Char
  • model_id Many2one → ir.model
    comodel_name='ir.model' ondelete='cascade' string='Model'
  • name Char
    compute='_compute_name' index=True inverse='_inverse_name' store=True
Public methods (6)
  • create(self, vals_list)
    @api.model_create_multi
  • job_config(self, name)
    @tools.ormcache('name')
  • job_default_config(self)
  • job_function_name(model_name, method_name)
    @staticmethod
  • unlink(self)
  • write(self, values)

New fields (0)

No new fields.

Public methods (1)
  • set_done(self)

New fields (1)
  • job_ids Many2many → queue.job
    comodel_name='queue.job' default=<expr> string='Jobs'
Public methods (1)
  • requeue(self)
REPOSITORY
REPOSITORYOCA/queue
GIT
GIThttps://github.com/OCA/queue.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/queue/tree/12.0/queue_job
VERSION
VERSION 4.1.0
CATEGORY
CATEGORYGeneric Modules
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Camptocamp, ACSONE SA/NV
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Camptocamp, ACSONE SA/NV
COMMITTERS
COMMITTERSStéphane Bidoul, Guewen Baconnier, Stefan Rijnhart, eLBati, Holger Brunn, Maxime Chambreuil, Sylvain LE GAL, GitHub, Denis Roussel, Enric Tobella, Uku Lagle, Stéphane Bidoul (ACSONE), Nils Hamerlinck, sbejaoui, OCA Transbot, Miquel Raïch, Thomas Binsfeld, Jordi Riera, oca-travis, Weblate, OCA-git-bot, Simone Orsi, oca-ci, Jaime Arroyo, duongtq, OCA git bot
WEBSITE
WEBSITEhttps://github.com/OCA/queue
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:29:20
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - mail
    - base
    - base_setup
    - web
    - bus
    - web_tour
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES requests
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (15)
XML IDNameModelTypeStatus
queue_job_assets queue.job.assets ir.ui.view qweb Inherits web.assets_backend
view_queue_job_channel_form queue.job.channel.form queue.job.channel form New
view_queue_job_channel_search queue.job.channel.search queue.job.channel search New
view_queue_job_channel_tree queue.job.channel.tree queue.job.channel tree New
view_queue_job_form queue.job.form queue.job form New
view_queue_job_function_form queue.job.function.form queue.job.function form New
view_queue_job_function_search queue.job.function.search queue.job.function search New
view_queue_job_function_tree queue.job.function.tree queue.job.function tree New
view_queue_job_graph queue.job.graph queue.job graph New
view_queue_job_pivot queue.job.pivot queue.job pivot New
view_queue_job_search queue.job.search queue.job search New
view_queue_job_tree queue.job.tree queue.job tree New
view_requeue_job Requeue Jobs queue.requeue.job form New
view_set_jobs_cancelled Cancel Jobs queue.jobs.to.cancelled form New
view_set_jobs_done Set Jobs to Done queue.jobs.to.done form New
Models touched (8)

New fields (0)

No new fields.

Public methods (2)
  • delayable(self, priority=None, eta=None, max_retries=None, description=None, channel=None, identity_key=None)
    @api.multi
    Return a ``Delayable`` The returned instance allows to enqueue any method of the recordset's Model. Usage:: delayable = self.env["res.users"].browse(10).delayable(priority=20) delayable.do_work(name="test"}).delay() In this example, the ``do_work`` method will not be executed directly. It will be executed in an asynchronous job. Method calls on a Delayable generally return themselves, so calls can be chained together:: delayable.set(priority=15).do_work(name="test"}).delay() The order of the calls that build the job is not relevant, beside the call to ``delay()`` that must happen at the very end. This is equivalent to the example above:: delayable.do_work(name="test"}).set(priority=15).delay() Very importantly, ``delay()`` must be called on the top-most parent of a chain of jobs, so if you have this:: job1 = record1.delayable().do_work() job2 = record2.delayable().do_work() job1.on_done(job2) The ``delay()`` call must be made on ``job1``, otherwise ``job2`` will be delayed, but ``job1`` will never be. When done on ``job1``, the ``delay()`` call will traverse the graph of jobs and delay all of them:: job1.delay() For more details on the graph dependencies, read the documentation of :module:`~odoo.addons.queue_job.delay`. :param priority: Priority of the job, 0 being the higher priority. Default is 10. :param eta: Estimated Time of Arrival of the job. It will not be executed before this date/time. :param max_retries: maximum number of retries before giving up and set the job state to 'failed'. A value of 0 means infinite retries. Default is 5. :param description: human description of the job. If None, description is computed from the function doc or name :param channel: the complete name of the channel to use to process the function. If specified it overrides the one defined on the function :param identity_key: key uniquely identifying the job, if specified and a job with the same key has not yet been run, the new job will not be added. It is either a string, either a function that takes the job as argument (see :py:func:`..job.identity_exact`). the new job will not be added. :return: instance of a Delayable :rtype: :class:`odoo.addons.queue_job.job.Delayable`
  • with_delay(self, priority=None, eta=None, max_retries=None, description=None, channel=None, identity_key=None)
    @api.multi
    Return a ``DelayableRecordset`` It is a shortcut for the longer form as shown below:: self.with_delay(priority=20).action_done() # is equivalent to: self.delayable().set(priority=20).action_done().delay() ``with_delay()`` accepts job properties which specify how the job will be executed. Usage with job properties:: env['a.model'].with_delay(priority=30, eta=60*60*5).action_done() delayable.export_one_thing(the_thing_to_export) # => the job will be executed with a low priority and not before a # delay of 5 hours from now When using :meth:``with_delay``, the final ``delay()`` is implicit. See the documentation of :meth:``delayable`` for more details. :return: instance of a DelayableRecordset :rtype: :class:`odoo.addons.queue_job.job.DelayableRecordset`

New fields (1)
  • ttype Selection
    selection_add=[('job_serialized', 'Job Serialized')]
Public methods (0)

No public methods.

New fields (29)
  • channel Char
    index=True
  • channel_method_name Char
    readonly=True string='Complete Method Name'
  • company_id Many2one → res.company
    comodel_name='res.company' index=True string='Company'
  • date_cancelled Datetime
    readonly=True
  • date_created Datetime
    readonly=True string='Created Date'
  • date_done Datetime
    readonly=True
  • date_enqueued Datetime
    readonly=True string='Enqueue Time'
  • date_started Datetime
    readonly=True string='Start Date'
  • eta Datetime
    string='Execute only after'
  • exc_info Text
    readonly=True string='Exception Info'
  • exc_message Char
    readonly=True string='Exception Message' track_visibility='onchange'
  • exc_name Char
    readonly=True string='Exception'
  • exec_time Float
    group_operator='avg' help='Time required to execute this job in seconds. Average when grouped.' string='Execution Time (avg)'
  • func_string Char
    readonly=True string='Task'
  • graph_jobs_count Integer
    compute='_compute_graph_jobs_count'
  • graph_uuid Char
    help='Single shared identifier of a Graph. Empty for a single job.' index=True readonly=True string='Graph UUID'
  • identity_key Char
    readonly=True
  • job_function_id Many2one → queue.job.function
    comodel_name='queue.job.function' readonly=True string='Job Function'
  • max_retries Integer
    help='The job will fail if the number of tries reach the max. retries.\nRetries are infinite when empty.' string='Max. retries'
  • method_name Char
    readonly=True
  • model_name Char
    readonly=True string='Model'
  • name Char
    readonly=True string='Description'
  • priority Integer
  • result Text
    readonly=True
  • retry Integer
    string='Current try'
  • state Selection
    index=True readonly=True required=True args: STATES
  • user_id Many2one → res.users
    comodel_name='res.users' string='User ID'
  • uuid Char
    index=True readonly=True required=True string='UUID'
  • worker_pid Integer
    readonly=True
Public methods (11)
  • autovacuum(self)
    @api.model
    Delete all jobs done based on the removal interval defined on the channel Called from a cron.
  • button_cancelled(self)
    @api.multi
  • button_done(self)
    @api.multi
  • create(self, vals_list)
    @api.model_create_multi
  • init(self)
    @api.model_cr
  • open_graph_jobs(self)
    @api.multi
    Return action that opens all jobs of the same graph
  • open_related_action(self)
    @api.multi
    Open the related action associated to the job
  • related_action_open_record(self)
    @api.multi
    Open a form view with the record(s) of the job. For instance, for a job on a ``product.product``, it will open a ``product.product`` form view with the product record(s) concerned by the job. If the job concerns more than one record, it opens them in a list. This is the default related action.
  • requeue(self)
    @api.multi
  • requeue_stuck_jobs(self, enqueued_delta=5, started_delta=0)
    @api.model
    Fix jobs that are in a bad states :param in_queue_delta: lookup time in minutes for jobs that are in enqueued state :param started_delta: lookup time in minutes for jobs that are in enqueued state, 0 means that it is not checked
  • write(self, vals)

New fields (5)
  • complete_name Char
    compute='_compute_complete_name' readonly=True store=True
  • job_function_ids One2many → queue.job.function
    comodel_name='queue.job.function' inverse_name='channel_id' string='Job Functions'
  • name Char
  • parent_id Many2one → queue.job.channel
    comodel_name='queue.job.channel' ondelete='restrict' string='Parent Channel'
  • removal_interval Integer
    default=<expr> required=True
Public methods (5)
  • create(self, vals_list)
    @api.model_create_multi
  • name_get(self)
    @api.multi
  • parent_required(self)
    @api.multi@api.constrains('parent_id', 'name')
  • unlink(self)
    @api.multi
  • write(self, values)
    @api.multi

New fields (7)
  • channel Char
    readonly=True related='channel_id.complete_name' store=True
  • channel_id Many2one → queue.job.channel
    comodel_name='queue.job.channel' default=_default_channel required=True string='Channel'
  • edit_related_action Text
    compute='_compute_edit_related_action' help='The action when the button *Related Action* is used on a job. The default action is to open the view of the record related to the job. Configured as a dictionary with optional keys: enable, func_name, kwargs.\nSee the module description for details.' inverse='_inverse_edit_related_action' string='Related Action'
  • edit_retry_pattern Text
    compute='_compute_edit_retry_pattern' help='Pattern expressing from the count of retries on retryable errors, the number of of seconds to postpone the next execution.\nExample: {1: 10, 5: 20, 10: 30, 15: 300}.\nSee the module description for details.' inverse='_inverse_edit_retry_pattern' string='Retry Pattern'
  • method Char
  • model_id Many2one → ir.model
    comodel_name='ir.model' ondelete='cascade' string='Model'
  • name Char
    compute='_compute_name' index=True inverse='_inverse_name' store=True
Public methods (6)
  • create(self, vals_list)
    @api.model_create_multi
  • job_config(self, name)
    @tools.ormcache('name')
  • job_default_config(self)
  • job_function_name(model_name, method_name)
    @staticmethod
  • unlink(self)
  • write(self, values)

New fields (0)

No new fields.

Public methods (1)
  • set_cancelled(self)
    @api.multi

New fields (0)

No new fields.

Public methods (1)
  • set_done(self)
    @api.multi

New fields (1)
  • job_ids Many2many → queue.job
    comodel_name='queue.job' default=_default_job_ids string='Jobs'
Public methods (1)
  • requeue(self)
    @api.multi
REPOSITORY
REPOSITORYOCA/queue
GIT
GIThttps://github.com/OCA/queue.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/queue/tree/11.0/queue_job
VERSION
VERSION 1.4.0
CATEGORY
CATEGORYGeneric Modules
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Camptocamp, ACSONE SA/NV
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Camptocamp, ACSONE SA/NV
COMMITTERS
COMMITTERSGuewen Baconnier, Leonardo Pistone, Pedro M. Baeza, GitHub, Stéphane Bidoul (ACSONE), Nils Hamerlinck, OCA Transbot, Graeme Gellatly, oca-travis, OCA-git-bot, Tom Blauwendraat, Simone Orsi, Sylvain GARANCHER, OCA Git Bot, François Honoré, JesusVMayor, Bob Leers
WEBSITE
WEBSITEhttps://github.com/OCA/queue/queue_job
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:23:59
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - mail
    - base
    - base_setup
    - web
    - bus
    - web_tour
    - base_sparse_field
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES requests
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (11)
XML IDNameModelTypeStatus
view_queue_job_channel_form queue.job.channel.form queue.job.channel form New
view_queue_job_channel_search queue.job.channel.search queue.job.channel search New
view_queue_job_channel_tree queue.job.channel.tree queue.job.channel tree New
view_queue_job_form queue.job.form queue.job form New
view_queue_job_function_form queue.job.function.form queue.job.function form New
view_queue_job_function_search queue.job.function.search queue.job.function search New
view_queue_job_function_tree queue.job.function.tree queue.job.function tree New
view_queue_job_search queue.job.search queue.job search New
view_queue_job_tree queue.job.tree queue.job tree New
view_requeue_job Requeue Jobs queue.requeue.job form New
view_set_jobs_done Requeue Jobs queue.jobs.to.done form New
Models touched (6)

New fields (0)

No new fields.

Public methods (1)
  • with_delay(self, priority=None, eta=None, max_retries=None, description=None, channel=None, identity_key=None)
    @api.multi
    Return a ``DelayableRecordset`` The returned instance allow to enqueue any method of the recordset's Model which is decorated by :func:`~odoo.addons.queue_job.job.job`. Usage:: self.env['res.users'].with_delay().write({'name': 'test'}) In the line above, in so far ``write`` is allowed to be delayed with ``@job``, the write will be executed in an asynchronous job. :param priority: Priority of the job, 0 being the higher priority. Default is 10. :param eta: Estimated Time of Arrival of the job. It will not be executed before this date/time. :param max_retries: maximum number of retries before giving up and set the job state to 'failed'. A value of 0 means infinite retries. Default is 5. :param description: human description of the job. If None, description is computed from the function doc or name :param channel: the complete name of the channel to use to process the function. If specified it overrides the one defined on the function :param identity_key: key uniquely identifying the job, if specified and a job with the same key has not yet been run, the new job will not be added. :return: instance of a DelayableRecordset :rtype: :class:`odoo.addons.queue_job.job.DelayableRecordset` Note for developers: if you want to run tests or simply disable jobs queueing for debugging purposes, you can: a. set the env var `TEST_QUEUE_JOB_NO_DELAY=1` b. pass a ctx key `test_queue_job_no_delay=1` In tests you'll have to mute the logger like: @mute_logger('odoo.addons.queue_job.models.base')

New fields (22)
  • channel Char
    compute='_compute_channel' index=True inverse='_inverse_channel' store=True
  • channel_method_name Char
    compute='_compute_job_function' readonly=True store=True
  • company_id Many2one → res.company
    comodel_name='res.company' index=True string='Company'
  • date_created Datetime
    readonly=True string='Created Date'
  • date_done Datetime
    readonly=True
  • date_enqueued Datetime
    readonly=True string='Enqueue Time'
  • date_started Datetime
    readonly=True string='Start Date'
  • eta Datetime
    string='Execute only after'
  • exc_info Text
    readonly=True string='Exception Info'
  • func_string Char
    compute='_compute_func_string' readonly=True store=True string='Task'
  • identity_key Char
  • job_function_id Many2one → queue.job.function
    comodel_name='queue.job.function' compute='_compute_job_function' readonly=True store=True string='Job Function'
  • max_retries Integer
    help='The job will fail if the number of tries reach the max. retries.\nRetries are infinite when empty.' string='Max. retries'
  • method_name Char
    readonly=True
  • model_name Char
    readonly=True string='Model'
  • name Char
    readonly=True string='Description'
  • priority Integer
  • result Text
    readonly=True
  • retry Integer
    string='Current try'
  • state Selection
    index=True readonly=True required=True args: STATES
  • user_id Many2one → res.users
    comodel_name='res.users' required=True string='User ID'
  • uuid Char
    index=True readonly=True required=True string='UUID'
Public methods (8)
  • autovacuum(self)
    @api.model
    Delete all jobs done based on the removal interval defined on the channel Called from a cron.
  • button_done(self)
    @api.multi
  • init(self)
    @api.model_cr
  • open_related_action(self)
    @api.multi
    Open the related action associated to the job
  • related_action_open_record(self)
    @api.multi
    Open a form view with the record(s) of the job. For instance, for a job on a ``product.product``, it will open a ``product.product`` form view with the product record(s) concerned by the job. If the job concerns more than one record, it opens them in a list. This is the default related action.
  • requeue(self)
    @api.multi
  • requeue_stuck_jobs(self, enqueued_delta=5, started_delta=0)
    @api.model
    Fix jobs that are in a bad states :param in_queue_delta: lookup time in minutes for jobs that are in enqueued state :param started_delta: lookup time in minutes for jobs that are in enqueued state, 0 means that it is not checked
  • write(self, vals)
    @api.multi

New fields (5)
  • complete_name Char
    compute='_compute_complete_name' readonly=True store=True
  • job_function_ids One2many → queue.job.function
    comodel_name='queue.job.function' inverse_name='channel_id' string='Job Functions'
  • name Char
  • parent_id Many2one → queue.job.channel
    comodel_name='queue.job.channel' ondelete='restrict' string='Parent Channel'
  • removal_interval Integer
    default=<expr> required=True
Public methods (4)
  • name_get(self)
    @api.multi
  • parent_required(self)
    @api.multi@api.constrains('parent_id', 'name')
  • unlink(self)
    @api.multi
  • write(self, values)
    @api.multi

New fields (3)
  • channel Char
    readonly=True related='channel_id.complete_name' store=True
  • channel_id Many2one → queue.job.channel
    comodel_name='queue.job.channel' default=_default_channel required=True string='Channel'
  • name Char
    index=True
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • set_done(self)
    @api.multi

New fields (1)
  • job_ids Many2many → queue.job
    comodel_name='queue.job' default=_default_job_ids string='Jobs'
Public methods (1)
  • requeue(self)
    @api.multi
REPOSITORY
REPOSITORYOCA/queue
GIT
GIThttps://github.com/OCA/queue.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/queue/tree/10.0/queue_job
VERSION
VERSION 1.2.0
CATEGORY
CATEGORYGeneric Modules
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Camptocamp, ACSONE SA/NV
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Camptocamp, ACSONE SA/NV
COMMITTERS
COMMITTERSBenoit Guillot, Stéphane Bidoul, Alexis de Lattre, Yannick Vaucher, Guewen Baconnier, Alexandre Fayolle, Raphaël Valyi, Joël Grand-Guillaume, Laetitia Gangloff, Stefan Rijnhart, Joel Grand-Guillaume, Leonardo Pistone, Sandy Carter, Holger Brunn, Olivier LAURENT, Pedro M. Baeza, Nicolas Bessi, GitHub, Thomas Rehn, Cédric Pigeon, Laurent Mignon (Acsone), Christophe Combelles, Laurent Mignon (ACSONE), Stéphane Bidoul (ACSONE), Carlos Lopez, Nils Hamerlinck, unknown, cubells, Sébastien Beau, Nicolas Bessi (nbessi), OCA Transbot, Sébastien BEAU, David Béal, Arthur Vuillard, Launchpad Translations on behalf of openerp-connector-core-editors, Jan-Philipp Fischer, Jonathan Nemry, Leonardo Donelli, Adrien Peiffer (ACSONE), Laurent Mignon, Graeme Gellatly, Laurent Mignon (aka lmi), Kevin.Lee, mgrohmann, Dave Lasley, oca-travis, OCA-git-bot, Mathias Colpaert, Leonardo Rochael Almeida, Tom Blauwendraat, Malte Jacobi, Simone Orsi, Nicolas Piganeau, Sylvain GARANCHER, OCA Git Bot, Nhomar Hernández [Vauxoo], florent.thomas, jssuzanne, nicolas-petit, David Lefever, Nicolas PIGANEAU, maxime-c2c, Benoit Aimont, Bob Leers, Meyomesse
WEBSITE
WEBSITEhttps://github.com/OCA/queue
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:19:58
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - mail
    - base
    - base_setup
    - web_kanban
    - web
    - bus
    - web_tour
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES requests
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (11)
XML IDNameModelTypeStatus
view_queue_job_channel_form queue.job.channel.form queue.job.channel form New
view_queue_job_channel_search queue.job.channel.search queue.job.channel search New
view_queue_job_channel_tree queue.job.channel.tree queue.job.channel tree New
view_queue_job_form queue.job.form queue.job form New
view_queue_job_function_form queue.job.function.form queue.job.function form New
view_queue_job_function_search queue.job.function.search queue.job.function search New
view_queue_job_function_tree queue.job.function.tree queue.job.function tree New
view_queue_job_search queue.job.search queue.job search New
view_queue_job_tree queue.job.tree queue.job tree New
view_requeue_job Requeue Jobs queue.requeue.job form New
view_set_jobs_done Requeue Jobs queue.jobs.to.done form New
Models touched (6)

New fields (0)

No new fields.

Public methods (1)
  • with_delay(self, priority=None, eta=None, max_retries=None, description=None, channel=None, identity_key=None)
    @api.multi
    Return a ``DelayableRecordset`` The returned instance allow to enqueue any method of the recordset's Model which is decorated by :func:`~odoo.addons.queue_job.job.job`. Usage:: self.env['res.users'].with_delay().write({'name': 'test'}) In the line above, in so far ``write`` is allowed to be delayed with ``@job``, the write will be executed in an asynchronous job. :param priority: Priority of the job, 0 being the higher priority. Default is 10. :param eta: Estimated Time of Arrival of the job. It will not be executed before this date/time. :param max_retries: maximum number of retries before giving up and set the job state to 'failed'. A value of 0 means infinite retries. Default is 5. :param description: human description of the job. If None, description is computed from the function doc or name :param channel: the complete name of the channel to use to process the function. If specified it overrides the one defined on the function :param identity_key: key uniquely identifying the job, if specified and a job with the same key has not yet been run, the new job will not be added. :return: instance of a DelayableRecordset :rtype: :class:`odoo.addons.queue_job.job.DelayableRecordset` Note for developers: if you want to run tests or simply disable jobs queueing for debugging purposes, you can: a. set the env var `TEST_QUEUE_JOB_NO_DELAY=1` b. pass a ctx key `test_queue_job_no_delay=1` In tests you'll have to mute the logger like: @mute_logger('odoo.addons.queue_job.models.base')

New fields (23)
  • channel Char
    compute='_compute_channel' index=True inverse='_inverse_channel' store=True
  • channel_method_name Char
    compute='_compute_job_function' readonly=True store=True
  • company_id Many2one → res.company
    comodel_name='res.company' index=True string='Company'
  • date_created Datetime
    readonly=True string='Created Date'
  • date_done Datetime
    readonly=True string='Date Done'
  • date_enqueued Datetime
    readonly=True string='Enqueue Time'
  • date_started Datetime
    readonly=True string='Start Date'
  • eta Datetime
    string='Execute only after'
  • exc_info Text
    readonly=True string='Exception Info'
  • func_string Char
    compute='_compute_func_string' readonly=True store=True string='Task'
  • identity_key Char
  • job_function_id Many2one → queue.job.function
    comodel_name='queue.job.function' compute='_compute_job_function' readonly=True store=True string='Job Function'
  • max_retries Integer
    help='The job will fail if the number of tries reach the max. retries.\nRetries are infinite when empty.' string='Max. retries'
  • method_name Char
    readonly=True
  • model_name Char
    readonly=True string='Model'
  • name Char
    readonly=True string='Description'
  • priority Integer
  • record_ids Serialized
    readonly=True
  • result Text
    readonly=True string='Result'
  • retry Integer
    string='Current try'
  • state Selection
    index=True readonly=True required=True string='State' args: STATES
  • user_id Many2one → res.users
    comodel_name='res.users' required=True string='User ID'
  • uuid Char
    index=True readonly=True required=True string='UUID'
Public methods (10)
  • action_done(self, reason=None)
    @api.multi
  • autovacuum(self)
    @api.model
    Delete all jobs done based on the removal interval defined on the channel Called from a cron.
  • button_done(self)
    @api.multi
  • button_done_ask_reason(self)
    @api.multi
  • init(self)
    @api.model_cr
  • open_related_action(self)
    @api.multi
    Open the related action associated to the job
  • related_action_open_record(self)
    @api.multi
    Open a form view with the record(s) of the job. For instance, for a job on a ``product.product``, it will open a ``product.product`` form view with the product record(s) concerned by the job. If the job concerns more than one record, it opens them in a list. This is the default related action.
  • requeue(self)
    @api.multi
  • requeue_stuck_jobs(self, enqueued_delta=5, started_delta=0)
    @api.model
    Fix jobs that are in a bad states :param in_queue_delta: lookup time in minutes for jobs that are in enqueued state :param started_delta: lookup time in minutes for jobs that are in enqueued state, 0 means that it is not checked
  • write(self, vals)
    @api.multi

New fields (5)
  • complete_name Char
    compute='_compute_complete_name' readonly=True store=True string='Complete Name'
  • job_function_ids One2many → queue.job.function
    comodel_name='queue.job.function' inverse_name='channel_id' string='Job Functions'
  • name Char
  • parent_id Many2one → queue.job.channel
    comodel_name='queue.job.channel' ondelete='restrict' string='Parent Channel'
  • removal_interval Integer
    default=<expr> required=True
Public methods (4)
  • name_get(self)
    @api.multi
  • parent_required(self)
    @api.multi@api.constrains('parent_id', 'name')
  • unlink(self)
    @api.multi
  • write(self, values)
    @api.multi

New fields (3)
  • channel Char
    readonly=True related='channel_id.complete_name' store=True
  • channel_id Many2one → queue.job.channel
    comodel_name='queue.job.channel' default=_default_channel required=True string='Channel'
  • name Char
    index=True
Public methods (0)

No public methods.

New fields (1)
  • reason Text
    string='Reason to set to done'
Public methods (1)
  • set_done(self)
    @api.multi

New fields (1)
  • job_ids Many2many → queue.job
    comodel_name='queue.job' default=_default_job_ids string='Jobs'
Public methods (1)
  • requeue(self)
    @api.multi