Skip to content

Commit aef86a1

Browse files
committed
Merge PR #693 into 18.0
Signed-off-by simahawk
2 parents 091315a + 34f6a00 commit aef86a1

25 files changed

Lines changed: 996 additions & 0 deletions

queue_job_cron/README.rst

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
===============================
2+
Scheduled Actions as Queue Jobs
3+
===============================
4+
5+
..
6+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7+
!! This file is generated by oca-gen-addon-readme !!
8+
!! changes will be overwritten. !!
9+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10+
!! source digest: sha256:c790b0e3494e59c709d57d7dbb0864ac37ce3af23801499f352df7528d5fe072
11+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
12+
13+
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
14+
:target: https://odoo-community.org/page/development-status
15+
:alt: Beta
16+
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
17+
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
18+
:alt: License: AGPL-3
19+
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fqueue-lightgray.png?logo=github
20+
:target: https://github.com/OCA/queue/tree/18.0/queue_job_cron
21+
:alt: OCA/queue
22+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23+
:target: https://translation.odoo-community.org/projects/queue-18-0/queue-18-0-queue_job_cron
24+
:alt: Translate me on Weblate
25+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/queue&target_branch=18.0
27+
:alt: Try me on Runboat
28+
29+
|badge1| |badge2| |badge3| |badge4| |badge5|
30+
31+
This module extends the functionality of queue_job and allows to run an
32+
Odoo cron as a queue job.
33+
34+
**Table of contents**
35+
36+
.. contents::
37+
:local:
38+
39+
Installation
40+
============
41+
42+
To install this module, you need to:
43+
44+
1. Just install it.
45+
46+
Usage
47+
=====
48+
49+
To use this module, you need to:
50+
51+
#. Go to a scheduled action, a flag "Run as queue job" will allow you to
52+
run the action as a queue job. You will also allowed to select a channel
53+
of its execution. To configure dedicated channels please refers to
54+
queue_job help:
55+
https://github.com/OCA/queue/blob/12.0/queue_job/README.rst
56+
57+
Channels can be used to manage sequential jobs and prevent concurrency
58+
accesses. To do that you just have to define a channel per cron limited
59+
to 1 at time.
60+
61+
Bug Tracker
62+
===========
63+
64+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/queue/issues>`_.
65+
In case of trouble, please check there if your issue has already been reported.
66+
If you spotted it first, help us to smash it by providing a detailed and welcomed
67+
`feedback <https://github.com/OCA/queue/issues/new?body=module:%20queue_job_cron%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
68+
69+
Do not contact contributors directly about support or help with technical issues.
70+
71+
Credits
72+
=======
73+
74+
Authors
75+
-------
76+
77+
* ACSONE SA/NV
78+
79+
Contributors
80+
------------
81+
82+
- Cédric Pigeon <cedric.pigeon@acsone.eu>
83+
- Nguyen Minh Chien <chien@trobz.com>
84+
- Tran Quoc duong <duongtq@trobz.com>
85+
- Vo Hong Thien <thienvh@trobz.com>
86+
87+
Other credits
88+
-------------
89+
90+
The migration of this module from 17.0 to 18.0 was financially supported
91+
by Camptocamp.
92+
93+
Maintainers
94+
-----------
95+
96+
This module is maintained by the OCA.
97+
98+
.. image:: https://odoo-community.org/logo.png
99+
:alt: Odoo Community Association
100+
:target: https://odoo-community.org
101+
102+
OCA, or the Odoo Community Association, is a nonprofit organization whose
103+
mission is to support the collaborative development of Odoo features and
104+
promote its widespread use.
105+
106+
This module is part of the `OCA/queue <https://github.com/OCA/queue/tree/18.0/queue_job_cron>`_ project on GitHub.
107+
108+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

queue_job_cron/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import models

queue_job_cron/__manifest__.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Copyright 2019 ACSONE SA/NV (<http://acsone.eu>)
2+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
3+
4+
{
5+
"name": "Scheduled Actions as Queue Jobs",
6+
"version": "18.0.1.0.0",
7+
"author": "ACSONE SA/NV,Odoo Community Association (OCA)",
8+
"website": "https://github.com/OCA/queue",
9+
"license": "AGPL-3",
10+
"category": "Generic Modules",
11+
"depends": ["queue_job"],
12+
"data": ["data/data.xml", "views/ir_cron_view.xml"],
13+
"installable": True,
14+
}

queue_job_cron/data/data.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<odoo>
3+
<record model="queue.job.channel" id="channel_root_ir_cron">
4+
<field name="name">ir_cron</field>
5+
<field name="parent_id" ref="queue_job.channel_root" />
6+
</record>
7+
<record model="queue.job.function" id="job_function_ir_cron_run_job_as_queue_job">
8+
<field name="model_id" ref="base.model_ir_cron" />
9+
<field name="method">_compute_run_as_queue_job</field>
10+
<field name="channel_id" ref="channel_root_ir_cron" />
11+
</record>
12+
</odoo>

queue_job_cron/i18n/de.po

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * queue_job_cron
4+
#
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: Odoo Server 12.0\n"
8+
"Report-Msgid-Bugs-To: \n"
9+
"PO-Revision-Date: 2019-07-12 14:43+0000\n"
10+
"Last-Translator: Maria Sparenberg <maria.sparenberg@gmx.net>\n"
11+
"Language-Team: none\n"
12+
"Language: de\n"
13+
"MIME-Version: 1.0\n"
14+
"Content-Type: text/plain; charset=UTF-8\n"
15+
"Content-Transfer-Encoding: \n"
16+
"Plural-Forms: nplurals=2; plural=n != 1;\n"
17+
"X-Generator: Weblate 3.7.1\n"
18+
19+
#. module: queue_job_cron
20+
#: model:ir.model.fields,field_description:queue_job_cron.field_ir_cron__channel_id
21+
msgid "Channel"
22+
msgstr "Kanal"
23+
24+
#. module: queue_job_cron
25+
#: model:ir.model.fields,field_description:queue_job_cron.field_ir_cron__run_as_queue_job
26+
msgid "Run As Queue Job"
27+
msgstr "als Warteschlangen-Job ausführen"
28+
29+
#. module: queue_job_cron
30+
#: model:ir.model,name:queue_job_cron.model_ir_cron
31+
msgid "Scheduled Actions"
32+
msgstr "Eingeplante Aktionen"
33+
34+
#. module: queue_job_cron
35+
#: model:ir.model.fields,help:queue_job_cron.field_ir_cron__run_as_queue_job
36+
msgid "Specify if this cron should be ran as a queue job"
37+
msgstr ""
38+
"Bitte spezifizieren, ob der Cron-Job als Warteschlangen-Job ausgeführt "
39+
"werden soll."

queue_job_cron/i18n/es.po

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * queue_job_cron
4+
#
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: Odoo Server 16.0\n"
8+
"Report-Msgid-Bugs-To: \n"
9+
"PO-Revision-Date: 2023-09-03 13:40+0000\n"
10+
"Last-Translator: kikopeiro <francisco.peiro@factorlibre.com>\n"
11+
"Language-Team: none\n"
12+
"Language: es\n"
13+
"MIME-Version: 1.0\n"
14+
"Content-Type: text/plain; charset=UTF-8\n"
15+
"Content-Transfer-Encoding: \n"
16+
"Plural-Forms: nplurals=2; plural=n != 1;\n"
17+
"X-Generator: Weblate 4.17\n"
18+
19+
#. module: queue_job_cron
20+
#: model:ir.model.fields,field_description:queue_job_cron.field_ir_cron__channel_id
21+
msgid "Channel"
22+
msgstr "Canal"
23+
24+
#. module: queue_job_cron
25+
#: model:ir.model.fields,field_description:queue_job_cron.field_ir_cron__run_as_queue_job
26+
msgid "Run As Queue Job"
27+
msgstr "Ejecutar como trabajo en cola"
28+
29+
#. module: queue_job_cron
30+
#: model:ir.model,name:queue_job_cron.model_ir_cron
31+
msgid "Scheduled Actions"
32+
msgstr "Acciones planificadas"
33+
34+
#. module: queue_job_cron
35+
#: model:ir.model.fields,help:queue_job_cron.field_ir_cron__run_as_queue_job
36+
msgid "Specify if this cron should be ran as a queue job"
37+
msgstr ""
38+
"Especifica si esta acción planificada deberá ser ejecutada como un trabajo "
39+
"en cola"

queue_job_cron/i18n/it.po

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * queue_job_cron
4+
#
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: Odoo Server 17.0\n"
8+
"Report-Msgid-Bugs-To: \n"
9+
"PO-Revision-Date: 2024-02-05 00:26+0000\n"
10+
"Last-Translator: mymage <stefano.consolaro@mymage.it>\n"
11+
"Language-Team: none\n"
12+
"Language: it\n"
13+
"MIME-Version: 1.0\n"
14+
"Content-Type: text/plain; charset=UTF-8\n"
15+
"Content-Transfer-Encoding: \n"
16+
"Plural-Forms: nplurals=2; plural=n != 1;\n"
17+
"X-Generator: Weblate 4.17\n"
18+
19+
#. module: queue_job_cron
20+
#: model:ir.model.fields,field_description:queue_job_cron.field_ir_cron__channel_id
21+
msgid "Channel"
22+
msgstr "Canale"
23+
24+
#. module: queue_job_cron
25+
#: model:ir.model.fields,field_description:queue_job_cron.field_ir_cron__run_as_queue_job
26+
msgid "Run As Queue Job"
27+
msgstr "Eseguire come lavoro in coda"
28+
29+
#. module: queue_job_cron
30+
#: model:ir.model,name:queue_job_cron.model_ir_cron
31+
msgid "Scheduled Actions"
32+
msgstr "Azioni pianificate"
33+
34+
#. module: queue_job_cron
35+
#: model:ir.model.fields,help:queue_job_cron.field_ir_cron__run_as_queue_job
36+
msgid "Specify if this cron should be ran as a queue job"
37+
msgstr "Indica se questo cron deve essere eseguito come un lavoro in coda"
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * queue_job_cron
4+
#
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: Odoo Server 17.0\n"
8+
"Report-Msgid-Bugs-To: \n"
9+
"Last-Translator: \n"
10+
"Language-Team: \n"
11+
"MIME-Version: 1.0\n"
12+
"Content-Type: text/plain; charset=UTF-8\n"
13+
"Content-Transfer-Encoding: \n"
14+
"Plural-Forms: \n"
15+
16+
#. module: queue_job_cron
17+
#: model:ir.model.fields,field_description:queue_job_cron.field_ir_cron__channel_id
18+
msgid "Channel"
19+
msgstr ""
20+
21+
#. module: queue_job_cron
22+
#: model:ir.model.fields,field_description:queue_job_cron.field_ir_cron__run_as_queue_job
23+
msgid "Run As Queue Job"
24+
msgstr ""
25+
26+
#. module: queue_job_cron
27+
#: model:ir.model,name:queue_job_cron.model_ir_cron
28+
msgid "Scheduled Actions"
29+
msgstr ""
30+
31+
#. module: queue_job_cron
32+
#: model:ir.model.fields,help:queue_job_cron.field_ir_cron__run_as_queue_job
33+
msgid "Specify if this cron should be ran as a queue job"
34+
msgstr ""

queue_job_cron/i18n/zh_CN.po

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * queue_job_cron
4+
#
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: Odoo Server 12.0\n"
8+
"Report-Msgid-Bugs-To: \n"
9+
"PO-Revision-Date: 2019-07-25 17:43+0000\n"
10+
"Last-Translator: 黎伟杰 <674416404@qq.com>\n"
11+
"Language-Team: none\n"
12+
"Language: zh_CN\n"
13+
"MIME-Version: 1.0\n"
14+
"Content-Type: text/plain; charset=UTF-8\n"
15+
"Content-Transfer-Encoding: \n"
16+
"Plural-Forms: nplurals=1; plural=0;\n"
17+
"X-Generator: Weblate 3.7.1\n"
18+
19+
#. module: queue_job_cron
20+
#: model:ir.model.fields,field_description:queue_job_cron.field_ir_cron__channel_id
21+
msgid "Channel"
22+
msgstr "频道"
23+
24+
#. module: queue_job_cron
25+
#: model:ir.model.fields,field_description:queue_job_cron.field_ir_cron__run_as_queue_job
26+
msgid "Run As Queue Job"
27+
msgstr "作为队列作业运行"
28+
29+
#. module: queue_job_cron
30+
#: model:ir.model,name:queue_job_cron.model_ir_cron
31+
msgid "Scheduled Actions"
32+
msgstr "安排的动作"
33+
34+
#. module: queue_job_cron
35+
#: model:ir.model.fields,help:queue_job_cron.field_ir_cron__run_as_queue_job
36+
msgid "Specify if this cron should be ran as a queue job"
37+
msgstr "指定此cron是否应作为队列作业运行"

queue_job_cron/models/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import ir_cron

0 commit comments

Comments
 (0)