Skip to content

Commit

Permalink
Merge pull request #365 from OCA/16.0
Browse files Browse the repository at this point in the history
Syncing from upstream OCA/queue (16.0)
  • Loading branch information
bt-admin authored Apr 4, 2024
2 parents 7b14c05 + bba3c93 commit b800ba8
Show file tree
Hide file tree
Showing 35 changed files with 784 additions and 25 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@ Available addons
addon | version | maintainers | summary
--- | --- | --- | ---
[base_export_async](base_export_async/) | 16.0.1.0.0 | | Asynchronous export with job queue
[base_import_async](base_import_async/) | 16.0.1.1.0 | | Import CSV files in the background
[queue_job](queue_job/) | 16.0.2.6.2 | [![guewen](https://github.com/guewen.png?size=30px)](https://github.com/guewen) | Job Queue
[queue_job_batch](queue_job_batch/) | 16.0.1.0.0 | | Job Queue Batch
[base_import_async](base_import_async/) | 16.0.1.1.1 | | Import CSV files in the background
[queue_job](queue_job/) | 16.0.2.6.3 | [![guewen](https://github.com/guewen.png?size=30px)](https://github.com/guewen) | Job Queue
[queue_job_batch](queue_job_batch/) | 16.0.1.0.1 | | Job Queue Batch
[queue_job_cron](queue_job_cron/) | 16.0.2.0.0 | | Scheduled Actions as Queue Jobs
[queue_job_cron_jobrunner](queue_job_cron_jobrunner/) | 16.0.1.0.0 | [![ivantodorovich](https://github.com/ivantodorovich.png?size=30px)](https://github.com/ivantodorovich) | Run jobs without a dedicated JobRunner
[queue_job_subscribe](queue_job_subscribe/) | 16.0.1.0.0 | | Control which users are subscribed to queue job notifications
[queue_job_web_notify](queue_job_web_notify/) | 16.0.1.0.0 | | This module allows to display a notification to the related user of a failed job. It uses the web_notify notification feature.
[test_queue_job](test_queue_job/) | 16.0.2.2.1 | | Queue Job Tests
[test_queue_job_batch](test_queue_job_batch/) | 16.0.1.0.0 | | Test Job Queue Batch

Expand Down
2 changes: 1 addition & 1 deletion base_import_async/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Asynchronous Import
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:e6374e585a643e2892d54c4838b3f74b861287f684624698d9028349bb33d8cd
!! source digest: sha256:4e6926a0780cf7844d24231d81d0fb2762f3a37c77d5e96696b9f5b0e3e5c5e2
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png
Expand Down
2 changes: 1 addition & 1 deletion base_import_async/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{
"name": "Asynchronous Import",
"summary": "Import CSV files in the background",
"version": "16.0.1.1.0",
"version": "16.0.1.1.1",
"author": "Akretion, ACSONE SA/NV, Odoo Community Association (OCA)",
"license": "AGPL-3",
"website": "https://github.com/OCA/queue",
Expand Down
2 changes: 1 addition & 1 deletion base_import_async/models/base_import_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from odoo.addons.queue_job.exception import FailedJobError

# options defined in base_import/import.js
OPT_HAS_HEADER = "headers"
OPT_HAS_HEADER = "has_headers"
OPT_SEPARATOR = "separator"
OPT_QUOTING = "quoting"
OPT_ENCODING = "encoding"
Expand Down
3 changes: 1 addition & 2 deletions base_import_async/static/description/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
Expand Down Expand Up @@ -367,7 +366,7 @@ <h1 class="title">Asynchronous Import</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:e6374e585a643e2892d54c4838b3f74b861287f684624698d9028349bb33d8cd
!! source digest: sha256:4e6926a0780cf7844d24231d81d0fb2762f3a37c77d5e96696b9f5b0e3e5c5e2
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Production/Stable" src="https://img.shields.io/badge/maturity-Production%2FStable-green.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/queue/tree/16.0/base_import_async"><img alt="OCA/queue" src="https://img.shields.io/badge/github-OCA%2Fqueue-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/queue-16-0/queue-16-0-base_import_async"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/queue&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module extends the standard CSV import functionality
Expand Down
2 changes: 1 addition & 1 deletion queue_job/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Job Queue
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:6a468245a7bf51f5231ce024e31df264518b337c966b2477e4e2368c08f6e96a
!! source digest: sha256:e00cfa154433ae38542e8979f0c9f025175b059f078c386a6f7905cc705001f7
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Mature-brightgreen.png
Expand Down
2 changes: 1 addition & 1 deletion queue_job/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{
"name": "Job Queue",
"version": "16.0.2.6.2",
"version": "16.0.2.6.3",
"author": "Camptocamp,ACSONE SA/NV,Odoo Community Association (OCA)",
"website": "https://github.com/OCA/queue",
"license": "LGPL-3",
Expand Down
2 changes: 1 addition & 1 deletion queue_job/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def DelayableRecordset(*args, **kwargs):
# prevent circular import
from .delay import DelayableRecordset as dr

_logger.debug(
_logger.warning(
"DelayableRecordset moved from the queue_job.job"
" to the queue_job.delay python module"
)
Expand Down
3 changes: 1 addition & 2 deletions queue_job/models/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@

from odoo import api, models

from ..delay import Delayable
from ..job import DelayableRecordset
from ..delay import Delayable, DelayableRecordset
from ..utils import must_run_without_delay


Expand Down
2 changes: 1 addition & 1 deletion queue_job/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ <h1 class="title">Job Queue</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:6a468245a7bf51f5231ce024e31df264518b337c966b2477e4e2368c08f6e96a
!! source digest: sha256:e00cfa154433ae38542e8979f0c9f025175b059f078c386a6f7905cc705001f7
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Mature" src="https://img.shields.io/badge/maturity-Mature-brightgreen.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-LGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/queue/tree/16.0/queue_job"><img alt="OCA/queue" src="https://img.shields.io/badge/github-OCA%2Fqueue-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/queue-16-0/queue-16-0-queue_job"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/queue&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This addon adds an integrated Job Queue to Odoo.</p>
Expand Down
2 changes: 1 addition & 1 deletion queue_job_batch/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Job Queue Batch
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:29600b710f0225edee91943dea2ea88211e9ce6e9db61ac8c66b1aa0672967b1
!! source digest: sha256:7eceb569ec18547f2b64717734aecc66c0db338d51e13d6f1324785c6c2f8407
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
Expand Down
2 changes: 1 addition & 1 deletion queue_job_batch/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

{
"name": "Job Queue Batch",
"version": "16.0.1.0.0",
"version": "16.0.1.0.1",
"author": "Creu Blanca,Odoo Community Association (OCA)",
"website": "https://github.com/OCA/queue",
"license": "AGPL-3",
Expand Down
3 changes: 1 addition & 2 deletions queue_job_batch/static/description/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
Expand Down Expand Up @@ -367,7 +366,7 @@ <h1 class="title">Job Queue Batch</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:29600b710f0225edee91943dea2ea88211e9ce6e9db61ac8c66b1aa0672967b1
!! source digest: sha256:7eceb569ec18547f2b64717734aecc66c0db338d51e13d6f1324785c6c2f8407
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/queue/tree/16.0/queue_job_batch"><img alt="OCA/queue" src="https://img.shields.io/badge/github-OCA%2Fqueue-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/queue-16-0/queue-16-0-queue_job_batch"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/queue&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This addon adds an a grouper for queue jobs.</p>
Expand Down
18 changes: 12 additions & 6 deletions queue_job_batch/static/src/js/systray_service.esm.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
/** @odoo-module **/

import {QueueJobBatchMenuContainer} from "./batch_menu_container_view.esm";

import {registry} from "@web/core/registry";
import session from "web.session";

const systrayRegistry = registry.category("systray");

export const systrayService = {
start() {
systrayRegistry.add(
"queue_job_batch.QueueJobBatchMenu",
{Component: QueueJobBatchMenuContainer},
{sequence: 99}
);
session
.user_has_group("queue_job_batch.group_queue_job_batch_user")
.then(function (has_group) {
if (has_group) {
systrayRegistry.add(
"queue_job_batch.QueueJobBatchMenu",
{Component: QueueJobBatchMenuContainer},
{sequence: 99}
);
}
});
},
};

Expand Down
107 changes: 107 additions & 0 deletions queue_job_web_notify/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
====================
Queue Job Web Notify
====================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:d5d921b41225ae3412b1aeedf7b7adca4716024d8ac224b973085dda1df3d79c
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fqueue-lightgray.png?logo=github
:target: https://github.com/OCA/queue/tree/16.0/queue_job_web_notify
:alt: OCA/queue
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/queue-16-0/queue-16-0-queue_job_web_notify
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/queue&target_branch=16.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module extends the mail notification feature of Queue Job. It adds
the possibility to enable the web notification of failed jobs. When
enabled, the user will be notified by a web notification. The web
notification is a pop-up message that appears in the user's browser.

**Table of contents**

.. contents::
:local:

Use Cases / Context
===================

The notification feature of this module allows the user to get a
immediate feedback about the status of the job.

Configuration
=============

To configure this module, you need to:

- Go to the list of queue job functions
- Enable the web notify feature

Usage
=====

To only usage of this module is its configuration:

- Go to the list of queue job functions
- Enable the web notify feature

Known issues / Roadmap
======================

- other notification contexts could be added (job started, job
finished, job canceled, etc.)

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/queue/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/queue/issues/new?body=module:%20queue_job_web_notify%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* ACSONE SA/NV

Contributors
------------

- Thomas Binsfeld [email protected] (https://www.acsone.eu/)

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

This module is part of the `OCA/queue <https://github.com/OCA/queue/tree/16.0/queue_job_web_notify>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions queue_job_web_notify/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
21 changes: 21 additions & 0 deletions queue_job_web_notify/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright 2024 ACSONE SA/NV,Odoo Community Association (OCA)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
"name": "Queue Job Web Notify",
"summary": """
This module allows to display a notification to the related user of a
failed job. It uses the web_notify notification feature.""",
"version": "16.0.1.0.0",
"author": "ACSONE SA/NV,Odoo Community Association (OCA)",
"website": "https://github.com/OCA/queue",
"license": "AGPL-3",
"category": "Generic Modules",
"depends": [
# OCA/queue
"queue_job",
# OCA/web
"web_notify",
],
"data": ["views/queue_job_function.xml"],
}
45 changes: 45 additions & 0 deletions queue_job_web_notify/i18n/fr.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * queue_job_web_notify
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-03-04 13:47+0000\n"
"PO-Revision-Date: 2024-03-04 13:47+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: queue_job_web_notify
#: model:ir.model.fields,help:queue_job_web_notify.field_queue_job_function__is_web_notify_failure_enabled
msgid "Display a notification in the user interface when the job fails."
msgstr ""
"Affiche une notification dans l'interface utilisateur lorsque le job échoue."

#. module: queue_job_web_notify
#: model:ir.model,name:queue_job_web_notify.model_queue_job_function
msgid "Job Functions"
msgstr ""

#. module: queue_job_web_notify
#. odoo-python
#: code:addons/queue_job_web_notify/models/queue_job.py:0
#, python-format
msgid "Job failed"
msgstr "Job échoué"

#. module: queue_job_web_notify
#: model:ir.model.fields,field_description:queue_job_web_notify.field_queue_job_function__is_web_notify_failure_enabled
msgid "Notify on failure"
msgstr "Notifier en cas d'échec"

#. module: queue_job_web_notify
#: model:ir.model,name:queue_job_web_notify.model_queue_job
msgid "Queue Job"
msgstr ""
41 changes: 41 additions & 0 deletions queue_job_web_notify/i18n/queue_job_web_notify.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * queue_job_web_notify
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: queue_job_web_notify
#: model:ir.model.fields,help:queue_job_web_notify.field_queue_job_function__is_web_notify_failure_enabled
msgid "Display a notification in the user interface when the job fails."
msgstr ""

#. module: queue_job_web_notify
#: model:ir.model,name:queue_job_web_notify.model_queue_job_function
msgid "Job Functions"
msgstr ""

#. module: queue_job_web_notify
#. odoo-python
#: code:addons/queue_job_web_notify/models/queue_job.py:0
#, python-format
msgid "Job failed"
msgstr ""

#. module: queue_job_web_notify
#: model:ir.model.fields,field_description:queue_job_web_notify.field_queue_job_function__is_web_notify_failure_enabled
msgid "Notify on failure"
msgstr ""

#. module: queue_job_web_notify
#: model:ir.model,name:queue_job_web_notify.model_queue_job
msgid "Queue Job"
msgstr ""
2 changes: 2 additions & 0 deletions queue_job_web_notify/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import queue_job_function
from . import queue_job
Loading

0 comments on commit b800ba8

Please sign in to comment.