diff --git a/README.md b/README.md index 9c905a5580ce..87ecf5a94bbc 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,7 @@ addon | version | maintainers | summary [web_group_expand](web_group_expand/) | 16.0.1.0.0 | | Group Expand Buttons [web_help](web_help/) | 16.0.2.0.0 | | Help Framework [web_ir_actions_act_multi](web_ir_actions_act_multi/) | 16.0.1.0.0 | | Enables triggering of more than one action on ActionManager +[web_ir_actions_act_window_message](web_ir_actions_act_window_message/) | 16.0.1.0.1 | | Show a message box to users [web_ir_actions_act_window_page](web_ir_actions_act_window_page/) | 16.0.1.0.0 | | Allows a developer to trigger a pager to show the previous or next next record in the form view [web_listview_range_select](web_listview_range_select/) | 16.0.1.0.0 | | Enables selecting a range of records using the shift key [web_m2x_options](web_m2x_options/) | 16.0.1.1.2 | | web_m2x_options diff --git a/setup/_metapackage/VERSION.txt b/setup/_metapackage/VERSION.txt index fd476a39e44e..90dbbcdf853c 100644 --- a/setup/_metapackage/VERSION.txt +++ b/setup/_metapackage/VERSION.txt @@ -1 +1 @@ -16.0.20231227.0 \ No newline at end of file +16.0.20240119.0 \ No newline at end of file diff --git a/setup/_metapackage/setup.py b/setup/_metapackage/setup.py index 649a8a1570c6..72ac4c653aeb 100644 --- a/setup/_metapackage/setup.py +++ b/setup/_metapackage/setup.py @@ -22,6 +22,7 @@ 'odoo-addon-web_group_expand>=16.0dev,<16.1dev', 'odoo-addon-web_help>=16.0dev,<16.1dev', 'odoo-addon-web_ir_actions_act_multi>=16.0dev,<16.1dev', + 'odoo-addon-web_ir_actions_act_window_message>=16.0dev,<16.1dev', 'odoo-addon-web_ir_actions_act_window_page>=16.0dev,<16.1dev', 'odoo-addon-web_listview_range_select>=16.0dev,<16.1dev', 'odoo-addon-web_m2x_options>=16.0dev,<16.1dev', diff --git a/setup/web_ir_actions_act_window_message/odoo/addons/web_ir_actions_act_window_message b/setup/web_ir_actions_act_window_message/odoo/addons/web_ir_actions_act_window_message new file mode 120000 index 000000000000..9ba0c510a7aa --- /dev/null +++ b/setup/web_ir_actions_act_window_message/odoo/addons/web_ir_actions_act_window_message @@ -0,0 +1 @@ +../../../../web_ir_actions_act_window_message \ No newline at end of file diff --git a/setup/web_ir_actions_act_window_message/setup.py b/setup/web_ir_actions_act_window_message/setup.py new file mode 100644 index 000000000000..28c57bb64031 --- /dev/null +++ b/setup/web_ir_actions_act_window_message/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) diff --git a/web_ir_actions_act_window_message/README.rst b/web_ir_actions_act_window_message/README.rst new file mode 100644 index 000000000000..4070b78b9a6d --- /dev/null +++ b/web_ir_actions_act_window_message/README.rst @@ -0,0 +1,140 @@ +========================= +Client side message boxes +========================= + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:c6ab6322d92b7ec73af6324032ed00e8a974d28ad30f78d025febc67e5976bf7 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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%2Fweb-lightgray.png?logo=github + :target: https://github.com/OCA/web/tree/16.0/web_ir_actions_act_window_message + :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_ir_actions_act_window_message + :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| + +This module allows to show a message popup on the client side as result of a button. + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +Depend on this module and return + +.. code:: python + + { + 'type': 'ir.actions.act_window.message', + 'title': _('My title'), + 'message': _('My message'), + # optional title of the close button, if not set, will be _('Close') + # if set False, no close button will be shown + # you can create your own close button with an action of type + # ir.actions.act_window_close + 'close_button_title': 'Make this window go away', + # Use HTML instead of text + 'is_html_message': True, + # this is an optional list of buttons to show + 'buttons': [ + # a button can be any action (also ir.actions.report.xml et al) + { + 'type': 'ir.actions.act_window', + 'name': 'All customers', + 'res_model': 'res.partner', + 'view_mode': 'form', + 'views': [[False, 'list'], [False, 'form']], + 'domain': [('customer', '=', True)], + }, + # or if type == method, you need to pass a model, a method name and + # parameters + { + 'type': 'method', + 'name': _('Yes, do it'), + 'model': self._name, + 'method': 'myfunction', + # list of arguments to pass positionally + 'args': [self.ids], + # dictionary of keyword arguments + 'kwargs': {'force': True}, + # button style + 'classes': 'btn-primary', + } + ] + } + +You are responsible for translating the messages. + +Known issues / Roadmap +====================== + +* add `message_type` to differenciate between warnings, errors, etc. +* have one `message_type` to show a nonmodal warning on top right + +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 +~~~~~~~ + +* Therp BV +* ACSONE SA/NV + +Contributors +~~~~~~~~~~~~ + +* Holger Brunn +* Zakaria Makrelouf (ACSONE SA/NV) +* Benjamin Willig (ACSONE SA/NV) +* Ioan Galan (Studio73) +* Abraham Anes (Studio73) +* Miguel Gandia (Studio73) +* `DynApps NV `_: + + * Koen Loodts + * Raf Ven + +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/web_ir_actions_act_window_message/__init__.py b/web_ir_actions_act_window_message/__init__.py new file mode 100644 index 000000000000..0650744f6bc6 --- /dev/null +++ b/web_ir_actions_act_window_message/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/web_ir_actions_act_window_message/__manifest__.py b/web_ir_actions_act_window_message/__manifest__.py new file mode 100644 index 000000000000..660b2d909bfb --- /dev/null +++ b/web_ir_actions_act_window_message/__manifest__.py @@ -0,0 +1,21 @@ +# Copyright 2017 Therp BV, ACSONE SA/NV +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +{ + "name": "Client side message boxes", + "version": "16.0.1.0.1", + "author": "Therp BV, " "ACSONE SA/NV, " "Odoo Community Association (OCA)", + "website": "https://github.com/OCA/web", + "license": "AGPL-3", + "category": "Hidden/Dependency", + "summary": "Show a message box to users", + "depends": ["web"], + "data": ["security/ir.model.access.csv"], + "assets": { + "web.assets_backend": [ + "web_ir_actions_act_window_message/static/src/**/**.esm.js", + ], + "web.assets_qweb": [ + "web_ir_actions_act_window_message/static/src/**/**.xml", + ], + }, +} diff --git a/web_ir_actions_act_window_message/i18n/ar.po b/web_ir_actions_act_window_message/i18n/ar.po new file mode 100644 index 000000000000..300f12249000 --- /dev/null +++ b/web_ir_actions_act_window_message/i18n/ar.po @@ -0,0 +1,27 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_ir_actions_act_window_message +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-06-02 09:52+0000\n" +"PO-Revision-Date: 2017-06-02 09:52+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Arabic (https://www.transifex.com/oca/teams/23907/ar/)\n" +"Language: ar\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 " +"&& n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n" + +#. module: web_ir_actions_act_window_message +#. openerp-web +#: code:addons/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js:0 +#, python-format +msgid "Close" +msgstr "إغلاق" diff --git a/web_ir_actions_act_window_message/i18n/de.po b/web_ir_actions_act_window_message/i18n/de.po new file mode 100644 index 000000000000..2d51b003c326 --- /dev/null +++ b/web_ir_actions_act_window_message/i18n/de.po @@ -0,0 +1,26 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_ir_actions_act_window_message +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-06-02 09:52+0000\n" +"PO-Revision-Date: 2017-06-02 09:52+0000\n" +"Last-Translator: OCA Transbot , 2017\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" + +#. module: web_ir_actions_act_window_message +#. openerp-web +#: code:addons/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js:0 +#, python-format +msgid "Close" +msgstr "Schließen" diff --git a/web_ir_actions_act_window_message/i18n/es.po b/web_ir_actions_act_window_message/i18n/es.po new file mode 100644 index 000000000000..7b22c628a6ef --- /dev/null +++ b/web_ir_actions_act_window_message/i18n/es.po @@ -0,0 +1,26 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_ir_actions_act_window_message +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-06-02 09:52+0000\n" +"PO-Revision-Date: 2017-06-02 09:52+0000\n" +"Last-Translator: OCA Transbot , 2017\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" + +#. module: web_ir_actions_act_window_message +#. openerp-web +#: code:addons/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js:0 +#, python-format +msgid "Close" +msgstr "Cerrar" diff --git a/web_ir_actions_act_window_message/i18n/eu.po b/web_ir_actions_act_window_message/i18n/eu.po new file mode 100644 index 000000000000..5a158d0929d2 --- /dev/null +++ b/web_ir_actions_act_window_message/i18n/eu.po @@ -0,0 +1,26 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_ir_actions_act_window_message +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-06-02 09:52+0000\n" +"PO-Revision-Date: 2017-06-02 09:52+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Basque (https://www.transifex.com/oca/teams/23907/eu/)\n" +"Language: eu\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_ir_actions_act_window_message +#. openerp-web +#: code:addons/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js:0 +#, python-format +msgid "Close" +msgstr "Itxi" diff --git a/web_ir_actions_act_window_message/i18n/fi.po b/web_ir_actions_act_window_message/i18n/fi.po new file mode 100644 index 000000000000..7c33b02ceacb --- /dev/null +++ b/web_ir_actions_act_window_message/i18n/fi.po @@ -0,0 +1,26 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_ir_actions_act_window_message +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-06-02 09:52+0000\n" +"PO-Revision-Date: 2017-06-02 09:52+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Finnish (https://www.transifex.com/oca/teams/23907/fi/)\n" +"Language: fi\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_ir_actions_act_window_message +#. openerp-web +#: code:addons/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js:0 +#, python-format +msgid "Close" +msgstr "Sulje" diff --git a/web_ir_actions_act_window_message/i18n/fr.po b/web_ir_actions_act_window_message/i18n/fr.po new file mode 100644 index 000000000000..2479dfc349a2 --- /dev/null +++ b/web_ir_actions_act_window_message/i18n/fr.po @@ -0,0 +1,26 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_ir_actions_act_window_message +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-06-02 09:52+0000\n" +"PO-Revision-Date: 2017-06-02 09:52+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n" +"Language: fr\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_ir_actions_act_window_message +#. openerp-web +#: code:addons/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js:0 +#, python-format +msgid "Close" +msgstr "Fermer" diff --git a/web_ir_actions_act_window_message/i18n/hr.po b/web_ir_actions_act_window_message/i18n/hr.po new file mode 100644 index 000000000000..618976fc63ef --- /dev/null +++ b/web_ir_actions_act_window_message/i18n/hr.po @@ -0,0 +1,27 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_ir_actions_act_window_message +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-06-02 09:52+0000\n" +"PO-Revision-Date: 2017-06-02 09:52+0000\n" +"Last-Translator: OCA Transbot , 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_ir_actions_act_window_message +#. openerp-web +#: code:addons/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js:0 +#, python-format +msgid "Close" +msgstr "Zatvori" diff --git a/web_ir_actions_act_window_message/i18n/it.po b/web_ir_actions_act_window_message/i18n/it.po new file mode 100644 index 000000000000..66fff7332285 --- /dev/null +++ b/web_ir_actions_act_window_message/i18n/it.po @@ -0,0 +1,26 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_ir_actions_act_window_message +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-06-02 09:52+0000\n" +"PO-Revision-Date: 2017-06-02 09:52+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Italian (https://www.transifex.com/oca/teams/23907/it/)\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" + +#. module: web_ir_actions_act_window_message +#. openerp-web +#: code:addons/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js:0 +#, python-format +msgid "Close" +msgstr "Chiudi" diff --git a/web_ir_actions_act_window_message/i18n/nl.po b/web_ir_actions_act_window_message/i18n/nl.po new file mode 100644 index 000000000000..089ad3e5fd78 --- /dev/null +++ b/web_ir_actions_act_window_message/i18n/nl.po @@ -0,0 +1,26 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_ir_actions_act_window_message +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-06-02 09:52+0000\n" +"PO-Revision-Date: 2017-06-02 09:52+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Dutch (https://www.transifex.com/oca/teams/23907/nl/)\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" + +#. module: web_ir_actions_act_window_message +#. openerp-web +#: code:addons/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js:0 +#, python-format +msgid "Close" +msgstr "Sluiten" diff --git a/web_ir_actions_act_window_message/i18n/nl_NL.po b/web_ir_actions_act_window_message/i18n/nl_NL.po new file mode 100644 index 000000000000..1c80e751cc96 --- /dev/null +++ b/web_ir_actions_act_window_message/i18n/nl_NL.po @@ -0,0 +1,27 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_ir_actions_act_window_message +# +# Translators: +# Peter Hageman , 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: 2017-06-22 08:27+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_ir_actions_act_window_message +#. openerp-web +#: code:addons/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js:0 +#, python-format +msgid "Close" +msgstr "Sluiten" diff --git a/web_ir_actions_act_window_message/i18n/pt.po b/web_ir_actions_act_window_message/i18n/pt.po new file mode 100644 index 000000000000..e70f09bf4f44 --- /dev/null +++ b/web_ir_actions_act_window_message/i18n/pt.po @@ -0,0 +1,26 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_ir_actions_act_window_message +# +# Translators: +# Pedro Castro Silva , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-01-03 03:50+0000\n" +"PO-Revision-Date: 2018-01-03 03:50+0000\n" +"Last-Translator: Pedro Castro Silva , 2017\n" +"Language-Team: Portuguese (https://www.transifex.com/oca/teams/23907/pt/)\n" +"Language: pt\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_ir_actions_act_window_message +#. openerp-web +#: code:addons/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js:0 +#, python-format +msgid "Close" +msgstr "Fechar" diff --git a/web_ir_actions_act_window_message/i18n/pt_BR.po b/web_ir_actions_act_window_message/i18n/pt_BR.po new file mode 100644 index 000000000000..325ae5185f12 --- /dev/null +++ b/web_ir_actions_act_window_message/i18n/pt_BR.po @@ -0,0 +1,27 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_ir_actions_act_window_message +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-06-02 09:52+0000\n" +"PO-Revision-Date: 2017-06-02 09:52+0000\n" +"Last-Translator: OCA Transbot , 2017\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" + +#. module: web_ir_actions_act_window_message +#. openerp-web +#: code:addons/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js:0 +#, python-format +msgid "Close" +msgstr "Fechar" diff --git a/web_ir_actions_act_window_message/i18n/ro.po b/web_ir_actions_act_window_message/i18n/ro.po new file mode 100644 index 000000000000..8df140ede8f0 --- /dev/null +++ b/web_ir_actions_act_window_message/i18n/ro.po @@ -0,0 +1,27 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_ir_actions_act_window_message +# +# Translators: +# Dorin Hongu , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-01-03 03:50+0000\n" +"PO-Revision-Date: 2018-01-03 03:50+0000\n" +"Last-Translator: Dorin Hongu , 2017\n" +"Language-Team: Romanian (https://www.transifex.com/oca/teams/23907/ro/)\n" +"Language: ro\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?" +"2:1));\n" + +#. module: web_ir_actions_act_window_message +#. openerp-web +#: code:addons/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js:0 +#, python-format +msgid "Close" +msgstr "Închide" diff --git a/web_ir_actions_act_window_message/i18n/sl.po b/web_ir_actions_act_window_message/i18n/sl.po new file mode 100644 index 000000000000..ea4a084eba3a --- /dev/null +++ b/web_ir_actions_act_window_message/i18n/sl.po @@ -0,0 +1,27 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_ir_actions_act_window_message +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-06-02 09:52+0000\n" +"PO-Revision-Date: 2017-06-02 09:52+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Slovenian (https://www.transifex.com/oca/teams/23907/sl/)\n" +"Language: sl\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n" +"%100==4 ? 2 : 3);\n" + +#. module: web_ir_actions_act_window_message +#. openerp-web +#: code:addons/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js:0 +#, python-format +msgid "Close" +msgstr "Zaključi" diff --git a/web_ir_actions_act_window_message/i18n/tr.po b/web_ir_actions_act_window_message/i18n/tr.po new file mode 100644 index 000000000000..bec58960406f --- /dev/null +++ b/web_ir_actions_act_window_message/i18n/tr.po @@ -0,0 +1,26 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_ir_actions_act_window_message +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-06-02 09:52+0000\n" +"PO-Revision-Date: 2017-06-02 09:52+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Turkish (https://www.transifex.com/oca/teams/23907/tr/)\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" + +#. module: web_ir_actions_act_window_message +#. openerp-web +#: code:addons/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js:0 +#, python-format +msgid "Close" +msgstr "Kapat" diff --git a/web_ir_actions_act_window_message/i18n/web_ir_actions_act_window_message.pot b/web_ir_actions_act_window_message/i18n/web_ir_actions_act_window_message.pot new file mode 100644 index 000000000000..32f31a0985f7 --- /dev/null +++ b/web_ir_actions_act_window_message/i18n/web_ir_actions_act_window_message.pot @@ -0,0 +1,110 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_ir_actions_act_window_message +# +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_ir_actions_act_window_message +#: model:ir.model.fields,field_description:web_ir_actions_act_window_message.field_ir_actions_act_window_message__help +msgid "Action Description" +msgstr "" + +#. module: web_ir_actions_act_window_message +#: model:ir.model.fields,field_description:web_ir_actions_act_window_message.field_ir_actions_act_window_message__name +msgid "Action Name" +msgstr "" + +#. module: web_ir_actions_act_window_message +#: model:ir.model.fields,field_description:web_ir_actions_act_window_message.field_ir_actions_act_window_message__type +msgid "Action Type" +msgstr "" + +#. module: web_ir_actions_act_window_message +#: model:ir.model,name:web_ir_actions_act_window_message.model_ir_actions_act_window_message +msgid "Action Window Message" +msgstr "" + +#. module: web_ir_actions_act_window_message +#: model:ir.model.fields,field_description:web_ir_actions_act_window_message.field_ir_actions_act_window_message__binding_model_id +msgid "Binding Model" +msgstr "" + +#. module: web_ir_actions_act_window_message +#: model:ir.model.fields,field_description:web_ir_actions_act_window_message.field_ir_actions_act_window_message__binding_type +msgid "Binding Type" +msgstr "" + +#. module: web_ir_actions_act_window_message +#: model:ir.model.fields,field_description:web_ir_actions_act_window_message.field_ir_actions_act_window_message__binding_view_types +msgid "Binding View Types" +msgstr "" + +#. module: web_ir_actions_act_window_message +#. odoo-javascript +#: code:addons/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.esm.js:0 +#, python-format +msgid "Close" +msgstr "" + +#. module: web_ir_actions_act_window_message +#: model:ir.model.fields,field_description:web_ir_actions_act_window_message.field_ir_actions_act_window_message__create_uid +msgid "Created by" +msgstr "" + +#. module: web_ir_actions_act_window_message +#: model:ir.model.fields,field_description:web_ir_actions_act_window_message.field_ir_actions_act_window_message__create_date +msgid "Created on" +msgstr "" + +#. module: web_ir_actions_act_window_message +#: model:ir.model.fields,field_description:web_ir_actions_act_window_message.field_ir_actions_act_window_message__display_name +msgid "Display Name" +msgstr "" + +#. module: web_ir_actions_act_window_message +#: model:ir.model.fields,field_description:web_ir_actions_act_window_message.field_ir_actions_act_window_message__xml_id +msgid "External ID" +msgstr "" + +#. module: web_ir_actions_act_window_message +#: model:ir.model.fields,field_description:web_ir_actions_act_window_message.field_ir_actions_act_window_message__id +msgid "ID" +msgstr "" + +#. module: web_ir_actions_act_window_message +#: model:ir.model.fields,field_description:web_ir_actions_act_window_message.field_ir_actions_act_window_message____last_update +msgid "Last Modified on" +msgstr "" + +#. module: web_ir_actions_act_window_message +#: model:ir.model.fields,field_description:web_ir_actions_act_window_message.field_ir_actions_act_window_message__write_uid +msgid "Last Updated by" +msgstr "" + +#. module: web_ir_actions_act_window_message +#: model:ir.model.fields,field_description:web_ir_actions_act_window_message.field_ir_actions_act_window_message__write_date +msgid "Last Updated on" +msgstr "" + +#. module: web_ir_actions_act_window_message +#: model:ir.model.fields,help:web_ir_actions_act_window_message.field_ir_actions_act_window_message__help +msgid "" +"Optional help text for the users with a description of the target view, such" +" as its usage and purpose." +msgstr "" + +#. module: web_ir_actions_act_window_message +#: model:ir.model.fields,help:web_ir_actions_act_window_message.field_ir_actions_act_window_message__binding_model_id +msgid "" +"Setting a value makes this action available in the sidebar for the given " +"model." +msgstr "" diff --git a/web_ir_actions_act_window_message/models/__init__.py b/web_ir_actions_act_window_message/models/__init__.py new file mode 100644 index 000000000000..16285e5e135d --- /dev/null +++ b/web_ir_actions_act_window_message/models/__init__.py @@ -0,0 +1 @@ +from . import ir_actions diff --git a/web_ir_actions_act_window_message/models/ir_actions.py b/web_ir_actions_act_window_message/models/ir_actions.py new file mode 100644 index 000000000000..3c6bbd9c905a --- /dev/null +++ b/web_ir_actions_act_window_message/models/ir_actions.py @@ -0,0 +1,21 @@ +# Part of Odoo. See LICENSE file for full copyright and licensing details. + +from odoo import fields, models + + +class IrActionsActWindowMessage(models.Model): + _name = "ir.actions.act_window.message" + _description = "Action Window Message" + _inherit = "ir.actions.actions" + _table = "ir_actions" + + type = fields.Char(default="ir.actions.act_window.message") + + def _get_readable_fields(self): + return super()._get_readable_fields() | { + "title", + "buttons", + "close_button_title", + "message", + "is_html_message", + } diff --git a/web_ir_actions_act_window_message/readme/CONTRIBUTORS.rst b/web_ir_actions_act_window_message/readme/CONTRIBUTORS.rst new file mode 100644 index 000000000000..b04bff5b43b4 --- /dev/null +++ b/web_ir_actions_act_window_message/readme/CONTRIBUTORS.rst @@ -0,0 +1,10 @@ +* Holger Brunn +* Zakaria Makrelouf (ACSONE SA/NV) +* Benjamin Willig (ACSONE SA/NV) +* Ioan Galan (Studio73) +* Abraham Anes (Studio73) +* Miguel Gandia (Studio73) +* `DynApps NV `_: + + * Koen Loodts + * Raf Ven diff --git a/web_ir_actions_act_window_message/readme/DESCRIPTION.rst b/web_ir_actions_act_window_message/readme/DESCRIPTION.rst new file mode 100644 index 000000000000..1223482e36d7 --- /dev/null +++ b/web_ir_actions_act_window_message/readme/DESCRIPTION.rst @@ -0,0 +1 @@ +This module allows to show a message popup on the client side as result of a button. diff --git a/web_ir_actions_act_window_message/readme/ROADMAP.rst b/web_ir_actions_act_window_message/readme/ROADMAP.rst new file mode 100644 index 000000000000..1a49589d6e6e --- /dev/null +++ b/web_ir_actions_act_window_message/readme/ROADMAP.rst @@ -0,0 +1,2 @@ +* add `message_type` to differenciate between warnings, errors, etc. +* have one `message_type` to show a nonmodal warning on top right diff --git a/web_ir_actions_act_window_message/readme/USAGE.rst b/web_ir_actions_act_window_message/readme/USAGE.rst new file mode 100644 index 000000000000..3f34ff7ce73a --- /dev/null +++ b/web_ir_actions_act_window_message/readme/USAGE.rst @@ -0,0 +1,44 @@ +Depend on this module and return + +.. code:: python + + { + 'type': 'ir.actions.act_window.message', + 'title': _('My title'), + 'message': _('My message'), + # optional title of the close button, if not set, will be _('Close') + # if set False, no close button will be shown + # you can create your own close button with an action of type + # ir.actions.act_window_close + 'close_button_title': 'Make this window go away', + # Use HTML instead of text + 'is_html_message': True, + # this is an optional list of buttons to show + 'buttons': [ + # a button can be any action (also ir.actions.report.xml et al) + { + 'type': 'ir.actions.act_window', + 'name': 'All customers', + 'res_model': 'res.partner', + 'view_mode': 'form', + 'views': [[False, 'list'], [False, 'form']], + 'domain': [('customer', '=', True)], + }, + # or if type == method, you need to pass a model, a method name and + # parameters + { + 'type': 'method', + 'name': _('Yes, do it'), + 'model': self._name, + 'method': 'myfunction', + # list of arguments to pass positionally + 'args': [self.ids], + # dictionary of keyword arguments + 'kwargs': {'force': True}, + # button style + 'classes': 'btn-primary', + } + ] + } + +You are responsible for translating the messages. diff --git a/web_ir_actions_act_window_message/security/ir.model.access.csv b/web_ir_actions_act_window_message/security/ir.model.access.csv new file mode 100644 index 000000000000..4cddddda351f --- /dev/null +++ b/web_ir_actions_act_window_message/security/ir.model.access.csv @@ -0,0 +1,2 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +crud_ir_actions_act_window_message,access_ir_actions_act_window_message,model_ir_actions_act_window_message,,1,1,1,1 diff --git a/web_ir_actions_act_window_message/static/description/icon.png b/web_ir_actions_act_window_message/static/description/icon.png new file mode 100644 index 000000000000..98965872769f Binary files /dev/null and b/web_ir_actions_act_window_message/static/description/icon.png differ diff --git a/web_ir_actions_act_window_message/static/description/index.html b/web_ir_actions_act_window_message/static/description/index.html new file mode 100644 index 000000000000..98b83ae9c423 --- /dev/null +++ b/web_ir_actions_act_window_message/static/description/index.html @@ -0,0 +1,485 @@ + + + + + +Client side message boxes + + + +
+

Client side message boxes

+ + +

Beta License: AGPL-3 OCA/web Translate me on Weblate Try me on Runboat

+

This module allows to show a message popup on the client side as result of a button.

+

Table of contents

+ +
+

Usage

+

Depend on this module and return

+
+{
+    'type': 'ir.actions.act_window.message',
+    'title': _('My title'),
+    'message': _('My message'),
+    # optional title of the close button, if not set, will be _('Close')
+    # if set False, no close button will be shown
+    # you can create your own close button with an action of type
+    # ir.actions.act_window_close
+    'close_button_title': 'Make this window go away',
+    # Use HTML instead of text
+    'is_html_message': True,
+    # this is an optional list of buttons to show
+    'buttons': [
+        # a button can be any action (also ir.actions.report.xml et al)
+        {
+            'type': 'ir.actions.act_window',
+            'name': 'All customers',
+            'res_model': 'res.partner',
+            'view_mode': 'form',
+            'views': [[False, 'list'], [False, 'form']],
+            'domain': [('customer', '=', True)],
+        },
+        # or if type == method, you need to pass a model, a method name and
+        # parameters
+        {
+            'type': 'method',
+            'name': _('Yes, do it'),
+            'model': self._name,
+            'method': 'myfunction',
+            # list of arguments to pass positionally
+            'args': [self.ids],
+            # dictionary of keyword arguments
+            'kwargs': {'force': True},
+            # button style
+            'classes': 'btn-primary',
+        }
+    ]
+}
+
+

You are responsible for translating the messages.

+
+
+

Known issues / Roadmap

+
    +
  • add message_type to differenciate between warnings, errors, etc.
  • +
  • have one message_type to show a nonmodal warning on top right
  • +
+
+
+

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

+
    +
  • Therp BV
  • +
  • ACSONE SA/NV
  • +
+
+
+

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/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.esm.js b/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.esm.js new file mode 100644 index 000000000000..3e7e758af4d7 --- /dev/null +++ b/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.esm.js @@ -0,0 +1,101 @@ +/** @odoo-module **/ + +import Dialog from "web.Dialog"; +import {registry} from "@web/core/registry"; + +function _refreshWidget(env) { + const controller = env.services.action.currentController; + const props = controller.props; + const view = controller.view; + // LEGACY CODE COMPATIBILITY: remove when controllers will be written in owl + if (view.isLegacy) { + // Case where a legacy view is reloaded via the view switcher + const {__legacy_widget__} = controller.getLocalState(); + const params = {}; + if ("resId" in props) { + params.currentId = props.resId; + } + return __legacy_widget__.reload(params); + } + // END LEGACY CODE COMPATIBILITY + env.services.action.switchView(props.type, {resId: props.resId}); +} + +function ir_actions_act_window_message_get_buttons(env, action, close_func) { + // Return an array of button definitions from action + return _.map(action.buttons || [], function (button_definition) { + return { + text: button_definition.name || "No name set", + classes: button_definition.classes || "btn-default", + click: function () { + if (button_definition.type === "method") { + env.services + .rpc("/web/dataset/call_button", { + model: button_definition.model, + method: button_definition.method, + args: button_definition.args, + kwargs: button_definition.kwargs, + }) + .then(function (result) { + if (_.isObject(result)) { + return env.services.action.doAction(result); + } + _refreshWidget(env); + }); + } else { + return env.services.action.doAction(button_definition); + } + close_func(); + }, + }; + }); +} + +async function _executeWindowMessageAction({env, action}) { + var buttons = []; + if (action.close_button_title !== false) { + buttons.push({ + text: action.close_button_title || env._t("Close"), + click: function () { + // Refresh the view before closing the dialog + _refreshWidget(env); + this.close(); + }, + classes: "btn-default", + }); + } + + var is_html = action.is_html_message === true; + var content_properties = {}; + + if (is_html) { + content_properties = { + html: action.message, + }; + } else { + content_properties = { + text: action.message, + css: { + "white-space": "pre-line", + }, + }; + } + var dialog = new Dialog( + this, + _.extend({ + size: "medium", + title: action.title, + $content: $("
", content_properties), + buttons: buttons.concat( + ir_actions_act_window_message_get_buttons(env, action, function () { + dialog.close(); + }) + ), + }) + ); + return dialog.open()._opened; +} + +registry + .category("action_handlers") + .add("ir.actions.act_window.message", _executeWindowMessageAction); diff --git a/web_ir_actions_act_window_message/static/src/xml/web_ir_actions_act_window_message.xml b/web_ir_actions_act_window_message/static/src/xml/web_ir_actions_act_window_message.xml new file mode 100644 index 000000000000..5d6944290cb4 --- /dev/null +++ b/web_ir_actions_act_window_message/static/src/xml/web_ir_actions_act_window_message.xml @@ -0,0 +1,7 @@ + +
+
+ +
+
+
diff --git a/web_touchscreen/i18n/it.po b/web_touchscreen/i18n/it.po new file mode 100644 index 000000000000..73388557f6d5 --- /dev/null +++ b/web_touchscreen/i18n/it.po @@ -0,0 +1,14 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: Automatically generated\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"