diff --git a/addons/web_notify/README.rst b/addons/web_notify/README.rst deleted file mode 100644 index 85bffef..0000000 --- a/addons/web_notify/README.rst +++ /dev/null @@ -1,186 +0,0 @@ -.. image:: https://odoo-community.org/readme-banner-image - :target: https://odoo-community.org/get-involved?utm_source=readme - :alt: Odoo Community Association - -========== -Web Notify -========== - -.. - !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! This file is generated by oca-gen-addon-readme !! - !! changes will be overwritten. !! - !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:20617e7f2a08e151432917686de12fb06a9644a8e086498ffb8b3bcf2d0d57b0 - !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - -.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png - :target: https://odoo-community.org/page/development-status - :alt: Production/Stable -.. |badge2| image:: https://img.shields.io/badge/license-LGPL--3-blue.png - :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html - :alt: License: LGPL-3 -.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github - :target: https://github.com/OCA/web/tree/16.0/web_notify - :alt: OCA/web -.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/web-16-0/web-16-0-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/web&target_branch=16.0 - :alt: Try me on Runboat - -|badge1| |badge2| |badge3| |badge4| |badge5| - -Send instant notification messages to the user in live. - -This technical module allows you to send instant notification messages from the server to the user in live. -Two kinds of notification are supported. - -* Success: Displayed in a `success` theme color flying popup div -* Danger: Displayed in a `danger` theme color flying popup div -* Warning: Displayed in a `warning` theme color flying popup div -* Information: Displayed in a `info` theme color flying popup div -* Default: Displayed in a `default` theme color flying popup div - -**Table of contents** - -.. contents:: - :local: - -Installation -============ - -This module is based on the Instant Messaging Bus. To work properly, the server must be launched in gevent mode. - -Usage -===== - - -To send a notification to the user you just need to call one of the new methods defined on res.users: - -.. code-block:: python - - self.env.user.notify_success(message='My success message') - -or - -.. code-block:: python - - self.env.user.notify_danger(message='My danger message') - -or - -.. code-block:: python - - self.env.user.notify_warning(message='My warning message') - -or - -.. code-block:: python - - self.env.user.notify_info(message='My information message') - -or - -.. code-block:: python - - self.env.user.notify_default(message='My default message') - -You can also add sound to your notifications by using the sound parameter. The sound parameter expects a string containing the URL path to the audio file that should be played when the notification is displayed. - -Example: - -.. code-block:: python - - self.env.user.notify_success(message='My success message', sound='//static/audio/success.mp3' ) - -or - -.. code-block:: python - - self.env.user.notify_info( message='My information message', sound='//static/audio/info.mp3' ) - -The sound parameter can be used with any notification type (success, danger, warning, info, or default). If the sound parameter is not provided, the notification will be displayed without any sound. - -The notifications can bring interactivity with some buttons. - -* One allowing to refresh the active view -* Another allowing to send a window / client action - -The reload button is activated when sending the notification with: - -The action can be used using the ``action`` keyword and we can choose which name to -give to our button with the ``button_name`` key in the action context `params` key: - -.. code-block:: python - - action = self.env["ir.actions.act_window"]._for_xml_id('sale.action_orders') - action.update({ - 'res_id': self.id, - 'views': [(False, 'form')], - }) - action["context"].setdefault("params", {}) - action["context"]["params"]["button_name"] = "Sales" - action["context"]["params"]["button_icon"] = "fa-eye" - self.env.user.notify_info('My information message', action=action) - - -.. figure:: https://raw.githubusercontent.com/OCA/web/16.0/web_notify/static/img/notifications_screenshot.gif - :alt: Sample notifications - -You can test the behaviour of the notifications by installing this module in a demo database. -Access the users form through Settings -> Users & Companies. You'll see a tab called "Test web notify", here you'll find two buttons that'll allow you test the module. - -.. figure:: https://raw.githubusercontent.com/OCA/web/16.0/web_notify/static/img/test_notifications_demo.png - :alt: Sample notifications - -Bug Tracker -=========== - -Bugs are tracked on `GitHub 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 `_. - -Do not contact contributors directly about support or help with technical issues. - -Credits -======= - -Authors -~~~~~~~ - -* ACSONE SA/NV -* AdaptiveCity - -Contributors -~~~~~~~~~~~~ - -* Laurent Mignon -* Serpent Consulting Services Pvt. Ltd. -* Aitor Bouzas -* Shepilov Vladislav -* Kevin Khao -* `Tecnativa `_: - - * David Vidal - -* Cetmix OÜ - -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/web `_ project on GitHub. - -You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/addons/web_notify/__init__.py b/addons/web_notify/__init__.py deleted file mode 100644 index 6a954cb..0000000 --- a/addons/web_notify/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# pylint: disable=missing-docstring -# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). - -from . import models diff --git a/addons/web_notify/__manifest__.py b/addons/web_notify/__manifest__.py deleted file mode 100644 index 4c105f7..0000000 --- a/addons/web_notify/__manifest__.py +++ /dev/null @@ -1,23 +0,0 @@ -# pylint: disable=missing-docstring -# Copyright 2016 ACSONE SA/NV -# License LGPL-3.0 or later (http://www.gnu.org/licenses/agpl). - -{ - "name": "Web Notify", - "summary": """ - Send notification messages to user""", - "version": "16.0.3.2.0", - "license": "LGPL-3", - "author": "ACSONE SA/NV," "AdaptiveCity," "Odoo Community Association (OCA)", - "development_status": "Production/Stable", - "website": "https://github.com/OCA/web", - "depends": ["web", "bus", "base", "mail"], - "assets": { - "web.assets_backend": [ - "web_notify/static/src/**/*.js", - "web_notify/static/src/**/*.xml", - ] - }, - "demo": ["views/res_users_demo.xml"], - "installable": True, -} diff --git a/addons/web_notify/i18n/da.po b/addons/web_notify/i18n/da.po deleted file mode 100644 index aa63f18..0000000 --- a/addons/web_notify/i18n/da.po +++ /dev/null @@ -1,129 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * web_notify -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 11.0\n" -"Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2018-09-02 05:11+0000\n" -"Last-Translator: Hans Henrik Gabelgaard \n" -"Language-Team: none\n" -"Language: da\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 3.1.1\n" - -#. module: web_notify -#. odoo-python -#: code:addons/web_notify/models/res_users.py:0 -#, python-format -msgid "Danger" -msgstr "" - -#. module: web_notify -#. odoo-python -#: code:addons/web_notify/models/res_users.py:0 -#, python-format -msgid "Default" -msgstr "" - -#. module: web_notify -#. odoo-python -#: code:addons/web_notify/models/res_users.py:0 -#, python-format -msgid "Information" -msgstr "" - -#. module: web_notify -#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_danger_channel_name -msgid "Notify Danger Channel Name" -msgstr "" - -#. module: web_notify -#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_default_channel_name -msgid "Notify Default Channel Name" -msgstr "" - -#. module: web_notify -#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_info_channel_name -msgid "Notify Info Channel Name" -msgstr "" - -#. module: web_notify -#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_success_channel_name -msgid "Notify Success Channel Name" -msgstr "" - -#. module: web_notify -#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_warning_channel_name -msgid "Notify Warning Channel Name" -msgstr "" - -#. module: web_notify -#. odoo-javascript -#: code:addons/web_notify/static/src/js/services/notification_services.esm.js:0 -#, python-format -msgid "Open" -msgstr "" - -#. module: web_notify -#. odoo-python -#: code:addons/web_notify/models/res_users.py:0 -#, python-format -msgid "Sending a notification to another user is forbidden." -msgstr "" - -#. module: web_notify -#. odoo-python -#: code:addons/web_notify/models/res_users.py:0 -#, python-format -msgid "Success" -msgstr "" - -#. module: web_notify -#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit -msgid "Test danger notification" -msgstr "" - -#. module: web_notify -#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit -msgid "Test default notification" -msgstr "" - -#. module: web_notify -#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit -msgid "Test info notification" -msgstr "" - -#. module: web_notify -#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit -msgid "Test success notification" -msgstr "" - -#. module: web_notify -#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit -msgid "Test warning notification" -msgstr "" - -#. module: web_notify -#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit -msgid "Test web notify" -msgstr "" - -#. module: web_notify -#: model:ir.model,name:web_notify.model_res_users -msgid "User" -msgstr "" - -#. module: web_notify -#. odoo-python -#: code:addons/web_notify/models/res_users.py:0 -#, python-format -msgid "Warning" -msgstr "Advarsel" - -#~ msgid "Users" -#~ msgstr "Brugere" diff --git a/addons/web_notify/i18n/de.po b/addons/web_notify/i18n/de.po deleted file mode 100644 index 54b57cc..0000000 --- a/addons/web_notify/i18n/de.po +++ /dev/null @@ -1,132 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * web_notify -# -# Translators: -# Niki Waibel , 2017 -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 10.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-02-03 01:37+0000\n" -"PO-Revision-Date: 2025-09-18 11:42+0000\n" -"Last-Translator: Bastian Günther \n" -"Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n" -"Language: de\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 5.10.4\n" - -#. module: web_notify -#. odoo-python -#: code:addons/web_notify/models/res_users.py:0 -#, python-format -msgid "Danger" -msgstr "Gefahr" - -#. module: web_notify -#. odoo-python -#: code:addons/web_notify/models/res_users.py:0 -#, python-format -msgid "Default" -msgstr "Standard" - -#. module: web_notify -#. odoo-python -#: code:addons/web_notify/models/res_users.py:0 -#, python-format -msgid "Information" -msgstr "Information" - -#. module: web_notify -#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_danger_channel_name -msgid "Notify Danger Channel Name" -msgstr "Name Gefahrenkanal Benachritigung" - -#. module: web_notify -#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_default_channel_name -msgid "Notify Default Channel Name" -msgstr "Name Standardkanal Benachritigung" - -#. module: web_notify -#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_info_channel_name -msgid "Notify Info Channel Name" -msgstr "Name Informationskanal Benachritigung" - -#. module: web_notify -#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_success_channel_name -msgid "Notify Success Channel Name" -msgstr "Name Erfolgskanal Benachrichtigung" - -#. module: web_notify -#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_warning_channel_name -msgid "Notify Warning Channel Name" -msgstr "Name Warnungskanal Benachritigung" - -#. module: web_notify -#. odoo-javascript -#: code:addons/web_notify/static/src/js/services/notification_services.esm.js:0 -#, python-format -msgid "Open" -msgstr "Öffnen" - -#. module: web_notify -#. odoo-python -#: code:addons/web_notify/models/res_users.py:0 -#, python-format -msgid "Sending a notification to another user is forbidden." -msgstr "Es ist verboten eine Nachricht an einem anderen Benutzer zu senden." - -#. module: web_notify -#. odoo-python -#: code:addons/web_notify/models/res_users.py:0 -#, python-format -msgid "Success" -msgstr "Erfolg" - -#. module: web_notify -#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit -msgid "Test danger notification" -msgstr "Test Gefahrenmeldung" - -#. module: web_notify -#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit -msgid "Test default notification" -msgstr "Standardbenachrichtigung testen" - -#. module: web_notify -#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit -msgid "Test info notification" -msgstr "Test Info Benachrichtigung" - -#. module: web_notify -#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit -msgid "Test success notification" -msgstr "Test Erfolgsbenarichtigung" - -#. module: web_notify -#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit -msgid "Test warning notification" -msgstr "Test Warnungsbenachritigung" - -#. module: web_notify -#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit -msgid "Test web notify" -msgstr "Test Webbenachrichtigung" - -#. module: web_notify -#: model:ir.model,name:web_notify.model_res_users -msgid "User" -msgstr "Benutzer" - -#. module: web_notify -#. odoo-python -#: code:addons/web_notify/models/res_users.py:0 -#, python-format -msgid "Warning" -msgstr "Warnung" - -#~ msgid "Users" -#~ msgstr "Benutzer" diff --git a/addons/web_notify/i18n/es.po b/addons/web_notify/i18n/es.po deleted file mode 100644 index a292a26..0000000 --- a/addons/web_notify/i18n/es.po +++ /dev/null @@ -1,132 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * web_notify -# -# Translators: -# Pedro M. Baeza , 2016 -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 10.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-12-23 02:13+0000\n" -"PO-Revision-Date: 2023-09-02 20:35+0000\n" -"Last-Translator: Ivorra78 \n" -"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n" -"Language: es\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.17\n" - -#. module: web_notify -#. odoo-python -#: code:addons/web_notify/models/res_users.py:0 -#, python-format -msgid "Danger" -msgstr "Peligro" - -#. module: web_notify -#. odoo-python -#: code:addons/web_notify/models/res_users.py:0 -#, python-format -msgid "Default" -msgstr "Predeterminado" - -#. module: web_notify -#. odoo-python -#: code:addons/web_notify/models/res_users.py:0 -#, python-format -msgid "Information" -msgstr "Información" - -#. module: web_notify -#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_danger_channel_name -msgid "Notify Danger Channel Name" -msgstr "Notificar el nombre del canal de peligro" - -#. module: web_notify -#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_default_channel_name -msgid "Notify Default Channel Name" -msgstr "Notificar Nombre de Canal por Defecto" - -#. module: web_notify -#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_info_channel_name -msgid "Notify Info Channel Name" -msgstr "Notificar información Nombre del canal" - -#. module: web_notify -#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_success_channel_name -msgid "Notify Success Channel Name" -msgstr "Notificar con éxito Nombre del canal" - -#. module: web_notify -#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_warning_channel_name -msgid "Notify Warning Channel Name" -msgstr "Notificar advertencia Nombre del canal" - -#. module: web_notify -#. odoo-javascript -#: code:addons/web_notify/static/src/js/services/notification_services.esm.js:0 -#, python-format -msgid "Open" -msgstr "" - -#. module: web_notify -#. odoo-python -#: code:addons/web_notify/models/res_users.py:0 -#, python-format -msgid "Sending a notification to another user is forbidden." -msgstr "Está prohibido enviar una notificación a otro usuario." - -#. module: web_notify -#. odoo-python -#: code:addons/web_notify/models/res_users.py:0 -#, python-format -msgid "Success" -msgstr "Éxito" - -#. module: web_notify -#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit -msgid "Test danger notification" -msgstr "Notificación de peligro de prueba" - -#. module: web_notify -#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit -msgid "Test default notification" -msgstr "Probar notificación predeterminada" - -#. module: web_notify -#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit -msgid "Test info notification" -msgstr "Notificación de información de prueba" - -#. module: web_notify -#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit -msgid "Test success notification" -msgstr "Notificación de éxito de la prueba" - -#. module: web_notify -#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit -msgid "Test warning notification" -msgstr "Notificación de advertencia de prueba" - -#. module: web_notify -#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit -msgid "Test web notify" -msgstr "Notificación web de prueba" - -#. module: web_notify -#: model:ir.model,name:web_notify.model_res_users -msgid "User" -msgstr "Usuario" - -#. module: web_notify -#. odoo-python -#: code:addons/web_notify/models/res_users.py:0 -#, python-format -msgid "Warning" -msgstr "Aviso" - -#~ msgid "Users" -#~ msgstr "Usuarios" diff --git a/addons/web_notify/i18n/hr.po b/addons/web_notify/i18n/hr.po deleted file mode 100644 index f97a9c6..0000000 --- a/addons/web_notify/i18n/hr.po +++ /dev/null @@ -1,137 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * web_notify -# -# Translators: -# Bole , 2017 -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 10.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-04-28 18:03+0000\n" -"PO-Revision-Date: 2017-04-28 18:03+0000\n" -"Last-Translator: Bole , 2017\n" -"Language-Team: Croatian (https://www.transifex.com/oca/teams/23907/hr/)\n" -"Language: hr\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" -"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" - -#. module: web_notify -#. odoo-python -#: code:addons/web_notify/models/res_users.py:0 -#, python-format -msgid "Danger" -msgstr "" - -#. module: web_notify -#. odoo-python -#: code:addons/web_notify/models/res_users.py:0 -#, python-format -msgid "Default" -msgstr "" - -#. module: web_notify -#. odoo-python -#: code:addons/web_notify/models/res_users.py:0 -#, python-format -msgid "Information" -msgstr "Informacija" - -#. module: web_notify -#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_danger_channel_name -#, fuzzy -msgid "Notify Danger Channel Name" -msgstr "Naziv kanala upozorenja" - -#. module: web_notify -#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_default_channel_name -#, fuzzy -msgid "Notify Default Channel Name" -msgstr "Naziv kanala informacija" - -#. module: web_notify -#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_info_channel_name -#, fuzzy -msgid "Notify Info Channel Name" -msgstr "Naziv kanala informacija" - -#. module: web_notify -#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_success_channel_name -#, fuzzy -msgid "Notify Success Channel Name" -msgstr "Naziv kanala informacija" - -#. module: web_notify -#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_warning_channel_name -#, fuzzy -msgid "Notify Warning Channel Name" -msgstr "Naziv kanala upozorenja" - -#. module: web_notify -#. odoo-javascript -#: code:addons/web_notify/static/src/js/services/notification_services.esm.js:0 -#, python-format -msgid "Open" -msgstr "" - -#. module: web_notify -#. odoo-python -#: code:addons/web_notify/models/res_users.py:0 -#, python-format -msgid "Sending a notification to another user is forbidden." -msgstr "" - -#. module: web_notify -#. odoo-python -#: code:addons/web_notify/models/res_users.py:0 -#, python-format -msgid "Success" -msgstr "" - -#. module: web_notify -#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit -msgid "Test danger notification" -msgstr "" - -#. module: web_notify -#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit -msgid "Test default notification" -msgstr "" - -#. module: web_notify -#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit -msgid "Test info notification" -msgstr "" - -#. module: web_notify -#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit -msgid "Test success notification" -msgstr "" - -#. module: web_notify -#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit -msgid "Test warning notification" -msgstr "" - -#. module: web_notify -#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit -msgid "Test web notify" -msgstr "" - -#. module: web_notify -#: model:ir.model,name:web_notify.model_res_users -msgid "User" -msgstr "" - -#. module: web_notify -#. odoo-python -#: code:addons/web_notify/models/res_users.py:0 -#, python-format -msgid "Warning" -msgstr "Upozorenje" - -#~ msgid "Users" -#~ msgstr "Korisnici" diff --git a/addons/web_notify/i18n/it.po b/addons/web_notify/i18n/it.po deleted file mode 100644 index 758be22..0000000 --- a/addons/web_notify/i18n/it.po +++ /dev/null @@ -1,129 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * web_notify -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 15.0\n" -"Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2024-04-02 11:35+0000\n" -"Last-Translator: mymage \n" -"Language-Team: none\n" -"Language: it\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.17\n" - -#. module: web_notify -#. odoo-python -#: code:addons/web_notify/models/res_users.py:0 -#, python-format -msgid "Danger" -msgstr "Pericolo" - -#. module: web_notify -#. odoo-python -#: code:addons/web_notify/models/res_users.py:0 -#, python-format -msgid "Default" -msgstr "Predefinito" - -#. module: web_notify -#. odoo-python -#: code:addons/web_notify/models/res_users.py:0 -#, python-format -msgid "Information" -msgstr "Informazione" - -#. module: web_notify -#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_danger_channel_name -msgid "Notify Danger Channel Name" -msgstr "Nome Canale Notifica Pericolo" - -#. module: web_notify -#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_default_channel_name -msgid "Notify Default Channel Name" -msgstr "Nome Canale Notifica Predefinito" - -#. module: web_notify -#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_info_channel_name -msgid "Notify Info Channel Name" -msgstr "Nome Canale Notifica Informazione" - -#. module: web_notify -#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_success_channel_name -msgid "Notify Success Channel Name" -msgstr "Nome Canale Notifica Successo" - -#. module: web_notify -#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_warning_channel_name -msgid "Notify Warning Channel Name" -msgstr "Nome Canale Notifica Avviso" - -#. module: web_notify -#. odoo-javascript -#: code:addons/web_notify/static/src/js/services/notification_services.esm.js:0 -#, python-format -msgid "Open" -msgstr "Apri" - -#. module: web_notify -#. odoo-python -#: code:addons/web_notify/models/res_users.py:0 -#, python-format -msgid "Sending a notification to another user is forbidden." -msgstr "L'invio di una notifica ad un altro utente è vietato." - -#. module: web_notify -#. odoo-python -#: code:addons/web_notify/models/res_users.py:0 -#, python-format -msgid "Success" -msgstr "Successo" - -#. module: web_notify -#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit -msgid "Test danger notification" -msgstr "Test notifica pericolo" - -#. module: web_notify -#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit -msgid "Test default notification" -msgstr "Test notifica predefinito" - -#. module: web_notify -#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit -msgid "Test info notification" -msgstr "Test notifica informazione" - -#. module: web_notify -#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit -msgid "Test success notification" -msgstr "Test notifica successo" - -#. module: web_notify -#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit -msgid "Test warning notification" -msgstr "Test notifica avviso" - -#. module: web_notify -#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit -msgid "Test web notify" -msgstr "Test notifica web" - -#. module: web_notify -#: model:ir.model,name:web_notify.model_res_users -msgid "User" -msgstr "Utente" - -#. module: web_notify -#. odoo-python -#: code:addons/web_notify/models/res_users.py:0 -#, python-format -msgid "Warning" -msgstr "Attenzione" - -#~ msgid "Users" -#~ msgstr "Utenti" diff --git a/addons/web_notify/i18n/nl.po b/addons/web_notify/i18n/nl.po deleted file mode 100644 index b613355..0000000 --- a/addons/web_notify/i18n/nl.po +++ /dev/null @@ -1,138 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * web_notify -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 14.0\n" -"Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2021-05-17 20:47+0000\n" -"Last-Translator: Bosd \n" -"Language-Team: none\n" -"Language: nl\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.3.2\n" - -#. module: web_notify -#. odoo-python -#: code:addons/web_notify/models/res_users.py:0 -#, python-format -msgid "Danger" -msgstr "Gevaar" - -#. module: web_notify -#. odoo-python -#: code:addons/web_notify/models/res_users.py:0 -#, python-format -msgid "Default" -msgstr "Standaard" - -#. module: web_notify -#. odoo-python -#: code:addons/web_notify/models/res_users.py:0 -#, python-format -msgid "Information" -msgstr "Informatie" - -#. module: web_notify -#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_danger_channel_name -msgid "Notify Danger Channel Name" -msgstr "" - -#. module: web_notify -#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_default_channel_name -msgid "Notify Default Channel Name" -msgstr "" - -#. module: web_notify -#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_info_channel_name -msgid "Notify Info Channel Name" -msgstr "" - -#. module: web_notify -#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_success_channel_name -msgid "Notify Success Channel Name" -msgstr "" - -#. module: web_notify -#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_warning_channel_name -msgid "Notify Warning Channel Name" -msgstr "" - -#. module: web_notify -#. odoo-javascript -#: code:addons/web_notify/static/src/js/services/notification_services.esm.js:0 -#, python-format -msgid "Open" -msgstr "" - -#. module: web_notify -#. odoo-python -#: code:addons/web_notify/models/res_users.py:0 -#, python-format -msgid "Sending a notification to another user is forbidden." -msgstr "" - -#. module: web_notify -#. odoo-python -#: code:addons/web_notify/models/res_users.py:0 -#, python-format -msgid "Success" -msgstr "Success" - -#. module: web_notify -#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit -msgid "Test danger notification" -msgstr "" - -#. module: web_notify -#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit -msgid "Test default notification" -msgstr "" - -#. module: web_notify -#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit -msgid "Test info notification" -msgstr "" - -#. module: web_notify -#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit -msgid "Test success notification" -msgstr "" - -#. module: web_notify -#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit -msgid "Test warning notification" -msgstr "" - -#. module: web_notify -#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit -msgid "Test web notify" -msgstr "" - -#. module: web_notify -#: model:ir.model,name:web_notify.model_res_users -msgid "User" -msgstr "" - -#. module: web_notify -#. odoo-python -#: code:addons/web_notify/models/res_users.py:0 -#, python-format -msgid "Warning" -msgstr "Waarschuwing" - -#~ msgid "Users" -#~ msgstr "Gebruikers" - -#~ msgid "Display Name" -#~ msgstr "Weergavenaam" - -#~ msgid "ID" -#~ msgstr "ID" - -#~ msgid "Last Modified on" -#~ msgstr "Laatst Gewijzigd op" diff --git a/addons/web_notify/i18n/nl_NL.po b/addons/web_notify/i18n/nl_NL.po deleted file mode 100644 index 698b650..0000000 --- a/addons/web_notify/i18n/nl_NL.po +++ /dev/null @@ -1,132 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * web_notify -# -# Translators: -# Peter Hageman , 2017 -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 10.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-07-13 16:07+0000\n" -"PO-Revision-Date: 2017-07-13 16:07+0000\n" -"Last-Translator: Peter Hageman , 2017\n" -"Language-Team: Dutch (Netherlands) (https://www.transifex.com/oca/" -"teams/23907/nl_NL/)\n" -"Language: nl_NL\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#. module: web_notify -#. odoo-python -#: code:addons/web_notify/models/res_users.py:0 -#, python-format -msgid "Danger" -msgstr "" - -#. module: web_notify -#. odoo-python -#: code:addons/web_notify/models/res_users.py:0 -#, python-format -msgid "Default" -msgstr "" - -#. module: web_notify -#. odoo-python -#: code:addons/web_notify/models/res_users.py:0 -#, python-format -msgid "Information" -msgstr "Informatie" - -#. module: web_notify -#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_danger_channel_name -msgid "Notify Danger Channel Name" -msgstr "" - -#. module: web_notify -#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_default_channel_name -msgid "Notify Default Channel Name" -msgstr "" - -#. module: web_notify -#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_info_channel_name -msgid "Notify Info Channel Name" -msgstr "" - -#. module: web_notify -#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_success_channel_name -msgid "Notify Success Channel Name" -msgstr "" - -#. module: web_notify -#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_warning_channel_name -msgid "Notify Warning Channel Name" -msgstr "" - -#. module: web_notify -#. odoo-javascript -#: code:addons/web_notify/static/src/js/services/notification_services.esm.js:0 -#, python-format -msgid "Open" -msgstr "" - -#. module: web_notify -#. odoo-python -#: code:addons/web_notify/models/res_users.py:0 -#, python-format -msgid "Sending a notification to another user is forbidden." -msgstr "" - -#. module: web_notify -#. odoo-python -#: code:addons/web_notify/models/res_users.py:0 -#, python-format -msgid "Success" -msgstr "" - -#. module: web_notify -#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit -msgid "Test danger notification" -msgstr "" - -#. module: web_notify -#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit -msgid "Test default notification" -msgstr "" - -#. module: web_notify -#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit -msgid "Test info notification" -msgstr "" - -#. module: web_notify -#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit -msgid "Test success notification" -msgstr "" - -#. module: web_notify -#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit -msgid "Test warning notification" -msgstr "" - -#. module: web_notify -#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit -msgid "Test web notify" -msgstr "" - -#. module: web_notify -#: model:ir.model,name:web_notify.model_res_users -msgid "User" -msgstr "" - -#. module: web_notify -#. odoo-python -#: code:addons/web_notify/models/res_users.py:0 -#, python-format -msgid "Warning" -msgstr "Waarschuwing" - -#~ msgid "Users" -#~ msgstr "Gebruikers" diff --git a/addons/web_notify/i18n/pt_BR.po b/addons/web_notify/i18n/pt_BR.po deleted file mode 100644 index e9b2121..0000000 --- a/addons/web_notify/i18n/pt_BR.po +++ /dev/null @@ -1,134 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * web_notify -# -# Translators: -# Rodrigo de Almeida Sottomaior Macedo , 2017 -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 10.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-06-22 08:27+0000\n" -"PO-Revision-Date: 2024-05-21 03:08+0000\n" -"Last-Translator: Rodrigo Macedo \n" -"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/teams/" -"23907/pt_BR/)\n" -"Language: pt_BR\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Plural-Forms: nplurals=2; plural=n > 1;\n" -"X-Generator: Weblate 4.17\n" - -#. module: web_notify -#. odoo-python -#: code:addons/web_notify/models/res_users.py:0 -#, python-format -msgid "Danger" -msgstr "Perigo" - -#. module: web_notify -#. odoo-python -#: code:addons/web_notify/models/res_users.py:0 -#, python-format -msgid "Default" -msgstr "Padrão" - -#. module: web_notify -#. odoo-python -#: code:addons/web_notify/models/res_users.py:0 -#, python-format -msgid "Information" -msgstr "Informação" - -#. module: web_notify -#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_danger_channel_name -msgid "Notify Danger Channel Name" -msgstr "Notificar o nome do canal de perigo" - -#. module: web_notify -#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_default_channel_name -msgid "Notify Default Channel Name" -msgstr "Notificar o nome do canal padrão" - -#. module: web_notify -#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_info_channel_name -msgid "Notify Info Channel Name" -msgstr "Notificar o nome do canal de informações" - -#. module: web_notify -#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_success_channel_name -msgid "Notify Success Channel Name" -msgstr "Notificar o nome do canal de sucesso" - -#. module: web_notify -#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_warning_channel_name -msgid "Notify Warning Channel Name" -msgstr "Notificar o nome do canal de alerta" - -#. module: web_notify -#. odoo-javascript -#: code:addons/web_notify/static/src/js/services/notification_services.esm.js:0 -#, python-format -msgid "Open" -msgstr "Aberto" - -#. module: web_notify -#. odoo-python -#: code:addons/web_notify/models/res_users.py:0 -#, python-format -msgid "Sending a notification to another user is forbidden." -msgstr "É proibido enviar uma notificação para outro usuário." - -#. module: web_notify -#. odoo-python -#: code:addons/web_notify/models/res_users.py:0 -#, python-format -msgid "Success" -msgstr "Sucesso" - -#. module: web_notify -#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit -msgid "Test danger notification" -msgstr "Notificação de teste de perigo" - -#. module: web_notify -#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit -msgid "Test default notification" -msgstr "Notificação de Teste padrão" - -#. module: web_notify -#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit -msgid "Test info notification" -msgstr "Notificação de Teste informativo" - -#. module: web_notify -#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit -msgid "Test success notification" -msgstr "Notificação de Teste de sucesso" - -#. module: web_notify -#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit -msgid "Test warning notification" -msgstr "Notificação de Teste de alerta" - -#. module: web_notify -#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit -msgid "Test web notify" -msgstr "Notificação de Web Teste" - -#. module: web_notify -#: model:ir.model,name:web_notify.model_res_users -msgid "User" -msgstr "Usuário" - -#. module: web_notify -#. odoo-python -#: code:addons/web_notify/models/res_users.py:0 -#, python-format -msgid "Warning" -msgstr "Alerta" - -#~ msgid "Users" -#~ msgstr "Usuários" diff --git a/addons/web_notify/i18n/tr.po b/addons/web_notify/i18n/tr.po deleted file mode 100644 index ad26c9e..0000000 --- a/addons/web_notify/i18n/tr.po +++ /dev/null @@ -1,126 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * web_notify -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 16.0\n" -"Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2025-02-20 10:06+0000\n" -"Last-Translator: İsmail Çağan Yılmaz \n" -"Language-Team: none\n" -"Language: tr\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 5.6.2\n" - -#. module: web_notify -#. odoo-python -#: code:addons/web_notify/models/res_users.py:0 -#, python-format -msgid "Danger" -msgstr "Tehlike" - -#. module: web_notify -#. odoo-python -#: code:addons/web_notify/models/res_users.py:0 -#, python-format -msgid "Default" -msgstr "Varsayılan" - -#. module: web_notify -#. odoo-python -#: code:addons/web_notify/models/res_users.py:0 -#, python-format -msgid "Information" -msgstr "Bilgi" - -#. module: web_notify -#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_danger_channel_name -msgid "Notify Danger Channel Name" -msgstr "Tehlike Kanal Adını Bildir" - -#. module: web_notify -#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_default_channel_name -msgid "Notify Default Channel Name" -msgstr "Varsayılan Kanal Adını Bildir" - -#. module: web_notify -#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_info_channel_name -msgid "Notify Info Channel Name" -msgstr "Bilgi Kanal Adını Bildir" - -#. module: web_notify -#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_success_channel_name -msgid "Notify Success Channel Name" -msgstr "Başarı Kanal Adını Bildir" - -#. module: web_notify -#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_warning_channel_name -msgid "Notify Warning Channel Name" -msgstr "Uyarı Kanal Adını Bildir" - -#. module: web_notify -#. odoo-javascript -#: code:addons/web_notify/static/src/js/services/notification_services.esm.js:0 -#, python-format -msgid "Open" -msgstr "Açık" - -#. module: web_notify -#. odoo-python -#: code:addons/web_notify/models/res_users.py:0 -#, python-format -msgid "Sending a notification to another user is forbidden." -msgstr "Başka bir kullanıcıya bildirim göndermek yasaktır." - -#. module: web_notify -#. odoo-python -#: code:addons/web_notify/models/res_users.py:0 -#, python-format -msgid "Success" -msgstr "Başarı" - -#. module: web_notify -#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit -msgid "Test danger notification" -msgstr "Tehlike bildirimini test edin" - -#. module: web_notify -#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit -msgid "Test default notification" -msgstr "Varsayılan bildirimi test edin" - -#. module: web_notify -#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit -msgid "Test info notification" -msgstr "Bilgi bildirimini test edin" - -#. module: web_notify -#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit -msgid "Test success notification" -msgstr "Başarı bildirimini test edin" - -#. module: web_notify -#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit -msgid "Test warning notification" -msgstr "Uyarı bildirimini test edin" - -#. module: web_notify -#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit -msgid "Test web notify" -msgstr "Web bildirimini test edin" - -#. module: web_notify -#: model:ir.model,name:web_notify.model_res_users -msgid "User" -msgstr "Kullanıcı" - -#. module: web_notify -#. odoo-python -#: code:addons/web_notify/models/res_users.py:0 -#, python-format -msgid "Warning" -msgstr "Uyarı" diff --git a/addons/web_notify/i18n/web_notify.pot b/addons/web_notify/i18n/web_notify.pot deleted file mode 100644 index 2440d07..0000000 --- a/addons/web_notify/i18n/web_notify.pot +++ /dev/null @@ -1,123 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * 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: web_notify -#. odoo-python -#: code:addons/web_notify/models/res_users.py:0 -#, python-format -msgid "Danger" -msgstr "" - -#. module: web_notify -#. odoo-python -#: code:addons/web_notify/models/res_users.py:0 -#, python-format -msgid "Default" -msgstr "" - -#. module: web_notify -#. odoo-python -#: code:addons/web_notify/models/res_users.py:0 -#, python-format -msgid "Information" -msgstr "" - -#. module: web_notify -#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_danger_channel_name -msgid "Notify Danger Channel Name" -msgstr "" - -#. module: web_notify -#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_default_channel_name -msgid "Notify Default Channel Name" -msgstr "" - -#. module: web_notify -#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_info_channel_name -msgid "Notify Info Channel Name" -msgstr "" - -#. module: web_notify -#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_success_channel_name -msgid "Notify Success Channel Name" -msgstr "" - -#. module: web_notify -#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_warning_channel_name -msgid "Notify Warning Channel Name" -msgstr "" - -#. module: web_notify -#. odoo-javascript -#: code:addons/web_notify/static/src/js/services/notification_services.esm.js:0 -#, python-format -msgid "Open" -msgstr "" - -#. module: web_notify -#. odoo-python -#: code:addons/web_notify/models/res_users.py:0 -#, python-format -msgid "Sending a notification to another user is forbidden." -msgstr "" - -#. module: web_notify -#. odoo-python -#: code:addons/web_notify/models/res_users.py:0 -#, python-format -msgid "Success" -msgstr "" - -#. module: web_notify -#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit -msgid "Test danger notification" -msgstr "" - -#. module: web_notify -#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit -msgid "Test default notification" -msgstr "" - -#. module: web_notify -#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit -msgid "Test info notification" -msgstr "" - -#. module: web_notify -#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit -msgid "Test success notification" -msgstr "" - -#. module: web_notify -#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit -msgid "Test warning notification" -msgstr "" - -#. module: web_notify -#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit -msgid "Test web notify" -msgstr "" - -#. module: web_notify -#: model:ir.model,name:web_notify.model_res_users -msgid "User" -msgstr "" - -#. module: web_notify -#. odoo-python -#: code:addons/web_notify/models/res_users.py:0 -#, python-format -msgid "Warning" -msgstr "" diff --git a/addons/web_notify/i18n/zh_CN.po b/addons/web_notify/i18n/zh_CN.po deleted file mode 100644 index fbb556f..0000000 --- a/addons/web_notify/i18n/zh_CN.po +++ /dev/null @@ -1,129 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * web_notify -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 12.0\n" -"Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2019-09-01 12:52+0000\n" -"Last-Translator: 黎伟杰 <674416404@qq.com>\n" -"Language-Team: none\n" -"Language: zh_CN\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Weblate 3.8\n" - -#. module: web_notify -#. odoo-python -#: code:addons/web_notify/models/res_users.py:0 -#, python-format -msgid "Danger" -msgstr "危险" - -#. module: web_notify -#. odoo-python -#: code:addons/web_notify/models/res_users.py:0 -#, python-format -msgid "Default" -msgstr "默认" - -#. module: web_notify -#. odoo-python -#: code:addons/web_notify/models/res_users.py:0 -#, python-format -msgid "Information" -msgstr "信息" - -#. module: web_notify -#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_danger_channel_name -msgid "Notify Danger Channel Name" -msgstr "通知危险频道名称" - -#. module: web_notify -#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_default_channel_name -msgid "Notify Default Channel Name" -msgstr "通知默认频道名称" - -#. module: web_notify -#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_info_channel_name -msgid "Notify Info Channel Name" -msgstr "通知信息频道名称" - -#. module: web_notify -#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_success_channel_name -msgid "Notify Success Channel Name" -msgstr "通知成功频道名称" - -#. module: web_notify -#: model:ir.model.fields,field_description:web_notify.field_res_users__notify_warning_channel_name -msgid "Notify Warning Channel Name" -msgstr "通知警告频道名称" - -#. module: web_notify -#. odoo-javascript -#: code:addons/web_notify/static/src/js/services/notification_services.esm.js:0 -#, python-format -msgid "Open" -msgstr "" - -#. module: web_notify -#. odoo-python -#: code:addons/web_notify/models/res_users.py:0 -#, python-format -msgid "Sending a notification to another user is forbidden." -msgstr "禁止向其他用户发送通知。" - -#. module: web_notify -#. odoo-python -#: code:addons/web_notify/models/res_users.py:0 -#, python-format -msgid "Success" -msgstr "成功" - -#. module: web_notify -#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit -msgid "Test danger notification" -msgstr "测试危险通知" - -#. module: web_notify -#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit -msgid "Test default notification" -msgstr "测试默认通知" - -#. module: web_notify -#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit -msgid "Test info notification" -msgstr "测试信息通知" - -#. module: web_notify -#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit -msgid "Test success notification" -msgstr "测试成功通知" - -#. module: web_notify -#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit -msgid "Test warning notification" -msgstr "测试警告通知" - -#. module: web_notify -#: model_terms:ir.ui.view,arch_db:web_notify.view_users_form_simple_modif_inherit -msgid "Test web notify" -msgstr "测试网站通知" - -#. module: web_notify -#: model:ir.model,name:web_notify.model_res_users -msgid "User" -msgstr "" - -#. module: web_notify -#. odoo-python -#: code:addons/web_notify/models/res_users.py:0 -#, python-format -msgid "Warning" -msgstr "警告" - -#~ msgid "Users" -#~ msgstr "用户" diff --git a/addons/web_notify/models/__init__.py b/addons/web_notify/models/__init__.py deleted file mode 100644 index 8835165..0000000 --- a/addons/web_notify/models/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from . import res_users diff --git a/addons/web_notify/models/res_users.py b/addons/web_notify/models/res_users.py deleted file mode 100644 index c98e132..0000000 --- a/addons/web_notify/models/res_users.py +++ /dev/null @@ -1,152 +0,0 @@ -# Copyright 2016 ACSONE SA/NV -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). -from odoo import _, api, exceptions, fields, models - -from odoo.addons.bus.models.bus import channel_with_db, json_dump -from odoo.addons.web.controllers.utils import clean_action - -DEFAULT_MESSAGE = "Default message" - -SUCCESS = "success" -DANGER = "danger" -WARNING = "warning" -INFO = "info" -DEFAULT = "default" - - -class ResUsers(models.Model): - _inherit = "res.users" - - @api.depends("create_date") - def _compute_channel_names(self): - for record in self: - record.notify_success_channel_name = json_dump( - channel_with_db(self.env.cr.dbname, record.partner_id) - ) - record.notify_danger_channel_name = json_dump( - channel_with_db(self.env.cr.dbname, record.partner_id) - ) - record.notify_warning_channel_name = json_dump( - channel_with_db(self.env.cr.dbname, record.partner_id) - ) - record.notify_info_channel_name = json_dump( - channel_with_db(self.env.cr.dbname, record.partner_id) - ) - record.notify_default_channel_name = json_dump( - channel_with_db(self.env.cr.dbname, record.partner_id) - ) - - notify_success_channel_name = fields.Char(compute="_compute_channel_names") - notify_danger_channel_name = fields.Char(compute="_compute_channel_names") - notify_warning_channel_name = fields.Char(compute="_compute_channel_names") - notify_info_channel_name = fields.Char(compute="_compute_channel_names") - notify_default_channel_name = fields.Char(compute="_compute_channel_names") - - def notify_success( - self, - message="Default message", - title=None, - sticky=False, - target=None, - action=None, - params=None, - sound=None, - ): - title = title or _("Success") - self._notify_channel( - SUCCESS, message, title, sticky, target, action, params, sound - ) - - def notify_danger( - self, - message="Default message", - title=None, - sticky=False, - target=None, - action=None, - params=None, - sound=None, - ): - title = title or _("Danger") - self._notify_channel( - DANGER, message, title, sticky, target, action, params, sound - ) - - def notify_warning( - self, - message="Default message", - title=None, - sticky=False, - target=None, - action=None, - params=None, - sound=None, - ): - title = title or _("Warning") - self._notify_channel( - WARNING, message, title, sticky, target, action, params, sound - ) - - def notify_info( - self, - message="Default message", - title=None, - sticky=False, - target=None, - action=None, - params=None, - sound=None, - ): - title = title or _("Information") - self._notify_channel( - INFO, message, title, sticky, target, action, params, sound - ) - - def notify_default( - self, - message="Default message", - title=None, - sticky=False, - target=None, - action=None, - params=None, - sound=None, - ): - title = title or _("Default") - self._notify_channel( - DEFAULT, message, title, sticky, target, action, params, sound - ) - - def _notify_channel( - self, - type_message=DEFAULT, - message=DEFAULT_MESSAGE, - title=None, - sticky=False, - target=None, - action=None, - params=None, - sound=None, - ): - if not (self.env.user._is_admin() or self.env.su) and any( - user.id != self.env.uid for user in self - ): - raise exceptions.UserError( - _("Sending a notification to another user is forbidden.") - ) - if not target: - target = self.partner_id - if action: - action = clean_action(action, self.env) - bus_message = { - "type": type_message, - "message": message, - "title": title, - "sticky": sticky, - "action": action, - "params": dict(params or []), - "sound": sound, - } - - notifications = [[partner, "web.notify", [bus_message]] for partner in target] - self.env["bus.bus"]._sendmany(notifications) diff --git a/addons/web_notify/readme/CONTRIBUTORS.rst b/addons/web_notify/readme/CONTRIBUTORS.rst deleted file mode 100644 index 19a6804..0000000 --- a/addons/web_notify/readme/CONTRIBUTORS.rst +++ /dev/null @@ -1,10 +0,0 @@ -* Laurent Mignon -* Serpent Consulting Services Pvt. Ltd. -* Aitor Bouzas -* Shepilov Vladislav -* Kevin Khao -* `Tecnativa `_: - - * David Vidal - -* Cetmix OÜ diff --git a/addons/web_notify/readme/DESCRIPTION.rst b/addons/web_notify/readme/DESCRIPTION.rst deleted file mode 100644 index 2cd8978..0000000 --- a/addons/web_notify/readme/DESCRIPTION.rst +++ /dev/null @@ -1,10 +0,0 @@ -Send instant notification messages to the user in live. - -This technical module allows you to send instant notification messages from the server to the user in live. -Two kinds of notification are supported. - -* Success: Displayed in a `success` theme color flying popup div -* Danger: Displayed in a `danger` theme color flying popup div -* Warning: Displayed in a `warning` theme color flying popup div -* Information: Displayed in a `info` theme color flying popup div -* Default: Displayed in a `default` theme color flying popup div diff --git a/addons/web_notify/readme/INSTALL.rst b/addons/web_notify/readme/INSTALL.rst deleted file mode 100644 index b47aebb..0000000 --- a/addons/web_notify/readme/INSTALL.rst +++ /dev/null @@ -1 +0,0 @@ -This module is based on the Instant Messaging Bus. To work properly, the server must be launched in gevent mode. diff --git a/addons/web_notify/readme/USAGE.rst b/addons/web_notify/readme/USAGE.rst deleted file mode 100644 index 0de3fcd..0000000 --- a/addons/web_notify/readme/USAGE.rst +++ /dev/null @@ -1,78 +0,0 @@ - -To send a notification to the user you just need to call one of the new methods defined on res.users: - -.. code-block:: python - - self.env.user.notify_success(message='My success message') - -or - -.. code-block:: python - - self.env.user.notify_danger(message='My danger message') - -or - -.. code-block:: python - - self.env.user.notify_warning(message='My warning message') - -or - -.. code-block:: python - - self.env.user.notify_info(message='My information message') - -or - -.. code-block:: python - - self.env.user.notify_default(message='My default message') - -You can also add sound to your notifications by using the sound parameter. The sound parameter expects a string containing the URL path to the audio file that should be played when the notification is displayed. - -Example: - -.. code-block:: python - - self.env.user.notify_success(message='My success message', sound='//static/audio/success.mp3' ) - -or - -.. code-block:: python - - self.env.user.notify_info( message='My information message', sound='//static/audio/info.mp3' ) - -The sound parameter can be used with any notification type (success, danger, warning, info, or default). If the sound parameter is not provided, the notification will be displayed without any sound. - -The notifications can bring interactivity with some buttons. - -* One allowing to refresh the active view -* Another allowing to send a window / client action - -The reload button is activated when sending the notification with: - -The action can be used using the ``action`` keyword and we can choose which name to -give to our button with the ``button_name`` key in the action context `params` key: - -.. code-block:: python - - action = self.env["ir.actions.act_window"]._for_xml_id('sale.action_orders') - action.update({ - 'res_id': self.id, - 'views': [(False, 'form')], - }) - action["context"].setdefault("params", {}) - action["context"]["params"]["button_name"] = "Sales" - action["context"]["params"]["button_icon"] = "fa-eye" - self.env.user.notify_info('My information message', action=action) - - -.. figure:: ../static/img/notifications_screenshot.gif - :alt: Sample notifications - -You can test the behaviour of the notifications by installing this module in a demo database. -Access the users form through Settings -> Users & Companies. You'll see a tab called "Test web notify", here you'll find two buttons that'll allow you test the module. - -.. figure:: ../static/img/test_notifications_demo.png - :alt: Sample notifications diff --git a/addons/web_notify/static/description/icon.png b/addons/web_notify/static/description/icon.png deleted file mode 100644 index 3e7d0bd..0000000 Binary files a/addons/web_notify/static/description/icon.png and /dev/null differ diff --git a/addons/web_notify/static/description/index.html b/addons/web_notify/static/description/index.html deleted file mode 100644 index 2db96e4..0000000 --- a/addons/web_notify/static/description/index.html +++ /dev/null @@ -1,514 +0,0 @@ - - - - - -README.rst - - - -
- - - -Odoo Community Association - -
-

Web Notify

- -

Production/Stable License: LGPL-3 OCA/web Translate me on Weblate Try me on Runboat

-

Send instant notification messages to the user in live.

-

This technical module allows you to send instant notification messages from the server to the user in live. -Two kinds of notification are supported.

-
    -
  • Success: Displayed in a success theme color flying popup div
  • -
  • Danger: Displayed in a danger theme color flying popup div
  • -
  • Warning: Displayed in a warning theme color flying popup div
  • -
  • Information: Displayed in a info theme color flying popup div
  • -
  • Default: Displayed in a default theme color flying popup div
  • -
-

Table of contents

- -
-

Installation

-

This module is based on the Instant Messaging Bus. To work properly, the server must be launched in gevent mode.

-
-
-

Usage

-

To send a notification to the user you just need to call one of the new methods defined on res.users:

-
-self.env.user.notify_success(message='My success message')
-
-

or

-
-self.env.user.notify_danger(message='My danger message')
-
-

or

-
-self.env.user.notify_warning(message='My warning message')
-
-

or

-
-self.env.user.notify_info(message='My information message')
-
-

or

-
-self.env.user.notify_default(message='My default message')
-
-

You can also add sound to your notifications by using the sound parameter. The sound parameter expects a string containing the URL path to the audio file that should be played when the notification is displayed.

-

Example:

-
-self.env.user.notify_success(message='My success message', sound='/<YOUR_MODULE>/static/audio/success.mp3' )
-
-

or

-
-self.env.user.notify_info( message='My information message', sound='/<YOUR_MODULE>/static/audio/info.mp3' )
-
-

The sound parameter can be used with any notification type (success, danger, warning, info, or default). If the sound parameter is not provided, the notification will be displayed without any sound.

-

The notifications can bring interactivity with some buttons.

-
    -
  • One allowing to refresh the active view
  • -
  • Another allowing to send a window / client action
  • -
-

The reload button is activated when sending the notification with:

-

The action can be used using the action keyword and we can choose which name to -give to our button with the button_name key in the action context params key:

-
-action = self.env["ir.actions.act_window"]._for_xml_id('sale.action_orders')
-action.update({
-   'res_id': self.id,
-   'views': [(False, 'form')],
-})
-action["context"].setdefault("params", {})
-action["context"]["params"]["button_name"] = "Sales"
-action["context"]["params"]["button_icon"] = "fa-eye"
-self.env.user.notify_info('My information message', action=action)
-
-
-Sample notifications -
-

You can test the behaviour of the notifications by installing this module in a demo database. -Access the users form through Settings -> Users & Companies. You’ll see a tab called “Test web notify”, here you’ll find two buttons that’ll allow you test the module.

-
-Sample notifications -
-
-
-

Bug Tracker

-

Bugs are tracked on GitHub 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.

-

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

-
-
-

Credits

-
-

Authors

-
    -
  • ACSONE SA/NV
  • -
  • AdaptiveCity
  • -
-
-
-

Contributors

- -
-
-

Maintainers

-

This module is maintained by the OCA.

- -Odoo Community Association - -

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/web project on GitHub.

-

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

-
-
-
-
- - diff --git a/addons/web_notify/static/img/notifications_screenshot.gif b/addons/web_notify/static/img/notifications_screenshot.gif deleted file mode 100644 index d085fca..0000000 Binary files a/addons/web_notify/static/img/notifications_screenshot.gif and /dev/null differ diff --git a/addons/web_notify/static/img/test_notifications_demo.png b/addons/web_notify/static/img/test_notifications_demo.png deleted file mode 100644 index 9047fba..0000000 Binary files a/addons/web_notify/static/img/test_notifications_demo.png and /dev/null differ diff --git a/addons/web_notify/static/src/components/audio_player.esm.js b/addons/web_notify/static/src/components/audio_player.esm.js deleted file mode 100644 index 54c4451..0000000 --- a/addons/web_notify/static/src/components/audio_player.esm.js +++ /dev/null @@ -1,70 +0,0 @@ -/** @odoo-module alias=web_notify.AudioPlayer **/ - -import {Component, useState} from "@odoo/owl"; - -/** - * @typedef AudioPlayerProps - * @property {string} src URL of the audio file to be played - * @property {number} [volume=1.0] Volume level of the audio (from 0.0 to 1.0) - * @property {boolean} [loop=false] Whether the audio should loop - * @property {Function} [onEnded] Callback function to be called when the audio ends - */ - -/** - * The AudioPlayer component is responsible for playing audio files with - * specified settings like volume and looping. It also provides the ability - * to trigger actions when the audio playback ends. - */ -export class AudioPlayer extends Component { - setup() { - this.state = useState({isPlaying: false}); - this.audioElement = new Audio(this.props.src); - - // Set audio properties - this.audioElement.volume = this.props.volume || 1.0; - this.audioElement.loop = this.props.loop || false; - - // Start playing the audio - this.audioElement - .play() - .then(() => { - this.state.isPlaying = true; - }) - .catch((error) => { - console.error("Audio playback failed:", error); - }); - - // Listen for the end of the audio playback - this.audioElement.addEventListener("ended", this.onAudioEnded.bind(this)); - } - - /** - * Stops the audio playback and triggers the onEnded callback if provided. - */ - stopAudio() { - this.audioElement.pause(); - this.audioElement.currentTime = 0; - this.state.isPlaying = false; - - if (this.props.onEnded) { - this.props.onEnded(); - } - } - - /** - * Handler for when the audio playback ends. - */ - onAudioEnded() { - if (!this.props.loop) { - this.stopAudio(); - } - } - - willUnmount() { - // Clean up the audio element and listeners - this.audioElement.removeEventListener("ended", this.onAudioEnded); - this.audioElement.pause(); - } -} - -AudioPlayer.template = "web_notify.AudioPlayer"; diff --git a/addons/web_notify/static/src/components/audio_player.xml b/addons/web_notify/static/src/components/audio_player.xml deleted file mode 100644 index 5db1994..0000000 --- a/addons/web_notify/static/src/components/audio_player.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - diff --git a/addons/web_notify/static/src/js/services/notification.esm.js b/addons/web_notify/static/src/js/services/notification.esm.js deleted file mode 100644 index 489fadd..0000000 --- a/addons/web_notify/static/src/js/services/notification.esm.js +++ /dev/null @@ -1,12 +0,0 @@ -/** @odoo-module */ -import {Notification} from "@web/core/notifications/notification"; -import {patch} from "web.utils"; - -patch(Notification.props, "webNotifyProps", { - type: { - type: String, - optional: true, - validate: (t) => - ["warning", "danger", "success", "info", "default"].includes(t), - }, -}); diff --git a/addons/web_notify/static/src/js/services/notification_services.esm.js b/addons/web_notify/static/src/js/services/notification_services.esm.js deleted file mode 100644 index 4eed219..0000000 --- a/addons/web_notify/static/src/js/services/notification_services.esm.js +++ /dev/null @@ -1,70 +0,0 @@ -/** @odoo-module **/ -import {Markup} from "web.utils"; -import {browser} from "@web/core/browser/browser"; -import {registry} from "@web/core/registry"; - -export const webNotificationService = { - dependencies: ["bus_service", "action", "notification_sound"], - - start(env, {bus_service, action, notification_sound}) { - let webNotifTimeouts = {}; - /** - * Displays the web notification with sound on user's screen - * @param {*} notifications - */ - function displaywebNotification(notifications) { - Object.values(webNotifTimeouts).forEach((notif) => - browser.clearTimeout(notif) - ); - webNotifTimeouts = {}; - notifications.forEach((notif) => { - browser.setTimeout(() => { - var buttons = []; - if (notif.action) { - const params = - (notif.action.context && notif.action.context.params) || {}; - buttons = [ - { - name: params.button_name || env._t("Open"), - primary: true, - onClick: async () => { - await action.doAction(notif.action); - }, - ...(params.button_icon && {icon: params.button_icon}), - }, - ]; - } - const notificationRemove = notification_sound.add( - Markup(notif.message), - { - title: notif.title, - type: notif.type, - sticky: notif.sticky, - className: notif.className, - buttons: buttons.map((button) => { - const onClick = button.onClick; - button.onClick = async () => { - await onClick(); - notificationRemove(); - }; - return button; - }), - sound: notif.sound, - } - ); - }); - }); - } - - bus_service.addEventListener("notification", ({detail: notifications}) => { - for (const {payload, type} of notifications) { - if (type === "web.notify") { - displaywebNotification(payload); - } - } - }); - bus_service.start(); - }, -}; - -registry.category("services").add("webNotification", webNotificationService); diff --git a/addons/web_notify/static/src/services/effect_service.esm.js b/addons/web_notify/static/src/services/effect_service.esm.js deleted file mode 100644 index 95d9fe5..0000000 --- a/addons/web_notify/static/src/services/effect_service.esm.js +++ /dev/null @@ -1,43 +0,0 @@ -/** @odoo-module **/ - -import {registry} from "@web/core/registry"; -import {AudioPlayer} from "../components/audio_player.esm"; -const effectRegistry = registry.category("effects"); - -// ----------------------------------------------------------------------------- -// Audio effect -// ----------------------------------------------------------------------------- - -/** - * Handles effect of type "audio_effect". It returns the AudioPlayer component - * with the given audio source URL and other properties. - * - * @param {Object} env - * @param {Object} [params={}] - * @param {string} params.src - * The URL of the audio file to play. - * @param {number} [params.volume=1.0] Volume level of the audio (from 0.0 to 1.0) - * @param {boolean} [params.loop=false] Whether the audio should loop - * @param {Function} [params.onEnded] Callback function to be called when the audio ends - */ - -function audioEffect(env, params = {}) { - if (!params.src) { - console.warn( - "Audio effect requires a 'src' parameter with the URL of the audio file." - ); - return; - } - - return { - Component: AudioPlayer, - props: { - src: params.src, - volume: params.volume || 1.0, - loop: params.loop || false, - onEnded: params.onEnded, - }, - }; -} - -effectRegistry.add("audio_effect", audioEffect); diff --git a/addons/web_notify/static/src/services/notification_sound_service.esm.js b/addons/web_notify/static/src/services/notification_sound_service.esm.js deleted file mode 100644 index 46ea7ee..0000000 --- a/addons/web_notify/static/src/services/notification_sound_service.esm.js +++ /dev/null @@ -1,58 +0,0 @@ -/** @odoo-module **/ - -import {registry} from "@web/core/registry"; - -/** - * The notificationSoundService is responsible for handling the playback of audio - * notifications when a new notification is added. This service integrates with - * the notification system and the effect service to provide audible feedback - * based on the type of notification. - * - * Dependencies: - * - notification: The service responsible for displaying notifications on the UI. - * - effect: The service that handles visual and auditory effects in the application. - */ - -export const notificationSoundService = { - dependencies: ["notification", "effect"], - - /** - * Starts the notification sound service, enabling sound playback for notifications. - * - * @param {Object} env The environment object, providing access to various services. - * @param {Object} services An object containing the dependencies (notification, effect). - * @returns {Object} The add function, used to add notifications with sound. - */ - start(env, {notification, effect}) { - /** - * Adds a notification with an associated sound effect. - * - * @param {String} message The message to be displayed in the notification. - * @param {Object} [options={}] Additional options for the notification, such as type, sound and etc - * @returns {Function} A function to close the notification. - */ - function add(message, options = {}) { - const sound = options.sound || false; - delete options.sound; // Remove sound option from the options before passing to notification - - const closeFn = notification.add(message, options); - - if (sound) - // Trigger the audio effect. - effect.add({ - type: "audio_effect", - src: sound, - volume: 0.8, - loop: false, - onEnded: () => { - // Placeholder for any action after sound ends - }, - }); - return closeFn; - } - return {add}; - }, -}; - -// Register the notification sound service in the service registry -registry.category("services").add("notification_sound", notificationSoundService); diff --git a/addons/web_notify/tests/__init__.py b/addons/web_notify/tests/__init__.py deleted file mode 100644 index 48f2d44..0000000 --- a/addons/web_notify/tests/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). - -from . import test_res_users diff --git a/addons/web_notify/tests/test_res_users.py b/addons/web_notify/tests/test_res_users.py deleted file mode 100644 index 2141d21..0000000 --- a/addons/web_notify/tests/test_res_users.py +++ /dev/null @@ -1,124 +0,0 @@ -# Copyright 2016 ACSONE SA/NV -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -import json - -from odoo import exceptions -from odoo.tests import common - -from ..models.res_users import DANGER, DEFAULT, INFO, SUCCESS, WARNING - - -class TestResUsers(common.TransactionCase): - def test_notify_success(self): - bus_bus = self.env["bus.bus"] - domain = [("channel", "=", self.env.user.notify_success_channel_name)] - existing = bus_bus.search(domain) - test_msg = { - "message": "message", - "title": "title", - "sticky": True, - "action": None, - "params": {}, - "sound": "/mail/static/src/audio/ting.mp3", - } - self.env.user.notify_success(**test_msg) - news = bus_bus.search(domain) - existing - self.assertEqual(1, len(news)) - test_msg.update({"type": SUCCESS}) - payload = json.loads(news.message)["payload"][0] - self.assertDictEqual(test_msg, payload) - - def test_notify_danger(self): - bus_bus = self.env["bus.bus"] - domain = [("channel", "=", self.env.user.notify_danger_channel_name)] - existing = bus_bus.search(domain) - test_msg = { - "message": "message", - "title": "title", - "sticky": True, - "action": None, - "params": {}, - "sound": "/mail/static/src/audio/ting.mp3", - } - self.env.user.notify_danger(**test_msg) - news = bus_bus.search(domain) - existing - self.assertEqual(1, len(news)) - test_msg.update({"type": DANGER}) - payload = json.loads(news.message)["payload"][0] - self.assertDictEqual(test_msg, payload) - - def test_notify_warning(self): - bus_bus = self.env["bus.bus"] - domain = [("channel", "=", self.env.user.notify_warning_channel_name)] - existing = bus_bus.search(domain) - test_msg = { - "message": "message", - "title": "title", - "sticky": True, - "action": None, - "params": {}, - "sound": "/mail/static/src/audio/ting.mp3", - } - self.env.user.notify_warning(**test_msg) - news = bus_bus.search(domain) - existing - self.assertEqual(1, len(news)) - test_msg.update({"type": WARNING}) - payload = json.loads(news.message)["payload"][0] - self.assertDictEqual(test_msg, payload) - - def test_notify_info(self): - bus_bus = self.env["bus.bus"] - domain = [("channel", "=", self.env.user.notify_info_channel_name)] - existing = bus_bus.search(domain) - test_msg = { - "message": "message", - "title": "title", - "sticky": True, - "action": None, - "params": {}, - "sound": "/mail/static/src/audio/ting.mp3", - } - self.env.user.notify_info(**test_msg) - news = bus_bus.search(domain) - existing - self.assertEqual(1, len(news)) - test_msg.update({"type": INFO}) - payload = json.loads(news.message)["payload"][0] - self.assertDictEqual(test_msg, payload) - - def test_notify_default(self): - bus_bus = self.env["bus.bus"] - domain = [("channel", "=", self.env.user.notify_default_channel_name)] - existing = bus_bus.search(domain) - test_msg = { - "message": "message", - "title": "title", - "sticky": True, - "action": None, - "params": {}, - "sound": "/mail/static/src/audio/ting.mp3", - } - self.env.user.notify_default(**test_msg) - news = bus_bus.search(domain) - existing - self.assertEqual(1, len(news)) - test_msg.update({"type": DEFAULT}) - payload = json.loads(news.message)["payload"][0] - self.assertDictEqual(test_msg, payload) - - def test_notify_many(self): - # check that the notification of a list of users is done with - # a single call to the bus - users = self.env.user.search([(1, "=", 1)]) - - self.assertTrue(len(users) > 1) - self.env.user.notify_warning(message="message", target=users.partner_id) - - def test_notify_other_user(self): - other_user = self.env.ref("base.user_demo") - other_user_model = self.env["res.users"].with_user(other_user) - with self.assertRaises(exceptions.UserError): - other_user_model.browse(self.env.uid).notify_info(message="hello") - - def test_notify_admin_allowed_other_user(self): - other_user = self.env.ref("base.user_demo") - other_user.notify_info(message="hello") diff --git a/addons/web_notify/views/res_users_demo.xml b/addons/web_notify/views/res_users_demo.xml deleted file mode 100644 index 135316b..0000000 --- a/addons/web_notify/views/res_users_demo.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - res.users.form.simple.view.modif.inherit - res.users - - - - - - -