From 559cb0d1897ba965f74e862a5028c13f0390594c Mon Sep 17 00:00:00 2001 From: yesser Date: Mon, 4 Aug 2025 14:36:15 +0100 Subject: [PATCH 001/404] [MIG] initial migration --- web_field_tooltip/README.rst | 104 ++++ web_field_tooltip/__init__.py | 1 + web_field_tooltip/__manifest__.py | 27 ++ web_field_tooltip/i18n/fr.po | 186 +++++++ web_field_tooltip/i18n/it.po | 162 +++++++ web_field_tooltip/i18n/web_field_tooltip.pot | 155 ++++++ .../migrations/17.0.1.0.0/post-migrate.py | 12 + web_field_tooltip/models/__init__.py | 4 + web_field_tooltip/models/base.py | 29 ++ web_field_tooltip/models/ir_http.py | 19 + .../models/ir_model_fields_tooltip.py | 76 +++ web_field_tooltip/models/res_users.py | 37 ++ web_field_tooltip/pyproject.toml | 3 + web_field_tooltip/readme/CONTRIBUTORS.md | 6 + web_field_tooltip/readme/DESCRIPTION.md | 2 + web_field_tooltip/readme/ROADMAP.md | 2 + web_field_tooltip/readme/USAGE.md | 11 + .../security/ir_model_access.xml | 46 ++ web_field_tooltip/security/res_groups.xml | 16 + web_field_tooltip/static/description/icon.png | Bin 0 -> 9455 bytes .../static/description/index.html | 454 ++++++++++++++++++ .../src/views/form/form_controller.esm.js | 36 ++ .../static/src/views/form/form_label.esm.js | 88 ++++ .../static/src/views/form/form_label.xml | 15 + web_field_tooltip/tests/__init__.py | 1 + .../tests/test_web_field_tooltip.py | 48 ++ .../views/ir_model_fields_tooltip.xml | 85 ++++ web_field_tooltip/views/res_users.xml | 22 + 28 files changed, 1647 insertions(+) create mode 100644 web_field_tooltip/README.rst create mode 100644 web_field_tooltip/__init__.py create mode 100644 web_field_tooltip/__manifest__.py create mode 100644 web_field_tooltip/i18n/fr.po create mode 100644 web_field_tooltip/i18n/it.po create mode 100644 web_field_tooltip/i18n/web_field_tooltip.pot create mode 100644 web_field_tooltip/migrations/17.0.1.0.0/post-migrate.py create mode 100644 web_field_tooltip/models/__init__.py create mode 100644 web_field_tooltip/models/base.py create mode 100644 web_field_tooltip/models/ir_http.py create mode 100644 web_field_tooltip/models/ir_model_fields_tooltip.py create mode 100644 web_field_tooltip/models/res_users.py create mode 100644 web_field_tooltip/pyproject.toml create mode 100644 web_field_tooltip/readme/CONTRIBUTORS.md create mode 100644 web_field_tooltip/readme/DESCRIPTION.md create mode 100644 web_field_tooltip/readme/ROADMAP.md create mode 100644 web_field_tooltip/readme/USAGE.md create mode 100644 web_field_tooltip/security/ir_model_access.xml create mode 100644 web_field_tooltip/security/res_groups.xml create mode 100644 web_field_tooltip/static/description/icon.png create mode 100644 web_field_tooltip/static/description/index.html create mode 100644 web_field_tooltip/static/src/views/form/form_controller.esm.js create mode 100644 web_field_tooltip/static/src/views/form/form_label.esm.js create mode 100644 web_field_tooltip/static/src/views/form/form_label.xml create mode 100644 web_field_tooltip/tests/__init__.py create mode 100644 web_field_tooltip/tests/test_web_field_tooltip.py create mode 100644 web_field_tooltip/views/ir_model_fields_tooltip.xml create mode 100644 web_field_tooltip/views/res_users.xml diff --git a/web_field_tooltip/README.rst b/web_field_tooltip/README.rst new file mode 100644 index 000000000000..9c826af7bc6c --- /dev/null +++ b/web_field_tooltip/README.rst @@ -0,0 +1,104 @@ +================= +Web Field Tooltip +================= + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:c72ceca13e4bfaa4dbe9b11719dc65bbae95ee1e9eb4f9b84830bf8900e32a0c + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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/17.0/web_field_tooltip + :alt: OCA/web +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/web-17-0/web-17-0-web_field_tooltip + :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=17.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module gives the possibility to add tooltips next to fields labels +on any field of a model. + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +To use this module, you need to: + +- Go to Settings / Technical / Database Structure / Fields Tooltips and + configure tooltips for a field for a model. You will then be able to + see on the form view of the model you chose, next to the label of the + field you selected, the tooltip appear. +- You can also go directly on the form view of a model on which you + want to add a tooltip and use the Manage tooltips Action to add a new + tooltip, or edit or delete existing tooltips for this model. +- For manager users, they can decide to display a helper to add a + tooltip on a field as some fields are not displayed with a label. + +Known issues / Roadmap +====================== + +- Find a way to update form views after tooltips update without + refreshing manually + +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 + +Contributors +------------ + +- Benoit Aimont (https://www.acsone.eu/) + +- `Sygel `__: + + - Manuel Regidor + - Harald Panten + - Valentín Vinagre + +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_field_tooltip/__init__.py b/web_field_tooltip/__init__.py new file mode 100644 index 000000000000..0650744f6bc6 --- /dev/null +++ b/web_field_tooltip/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/web_field_tooltip/__manifest__.py b/web_field_tooltip/__manifest__.py new file mode 100644 index 000000000000..e54d1b856f5f --- /dev/null +++ b/web_field_tooltip/__manifest__.py @@ -0,0 +1,27 @@ +# Copyright 2019 - TODAY Serpent Consulting Services Pvt. Ltd. +# Copyright 2023 ACSONE SA/NV +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +{ + "name": "Web Field Tooltip", + "summary": """ + Displays customizable tooltips for fields""", + "version": "18.0.1.0.0", + "license": "AGPL-3", + "author": "ACSONE SA/NV,Odoo Community Association (OCA)", + "website": "https://github.com/OCA/web", + "depends": ["web"], + "data": [ + "security/res_groups.xml", + "security/ir_model_access.xml", + "views/ir_model_fields_tooltip.xml", + "views/res_users.xml", + ], + "assets": { + "web.assets_backend": [ + "/web_field_tooltip/static/src/views/form/form_controller.esm.js", + "/web_field_tooltip/static/src/views/form/form_label.esm.js", + "/web_field_tooltip/static/src/views/form/form_label.xml", + ], + }, +} diff --git a/web_field_tooltip/i18n/fr.po b/web_field_tooltip/i18n/fr.po new file mode 100644 index 000000000000..20020f6c28dd --- /dev/null +++ b/web_field_tooltip/i18n/fr.po @@ -0,0 +1,186 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_field_tooltip +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 13.0+e\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-08-01 08:24+0000\n" +"PO-Revision-Date: 2024-05-15 12:38+0000\n" +"Last-Translator: Hughes Damry \n" +"Language-Team: \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" +"X-Generator: Weblate 4.17\n" + +#. module: web_field_tooltip +#. odoo-python +#: code:addons/web_field_tooltip/models/ir_model_fields_tooltip.py:0 +#, python-format +msgid "A tooltip already exists for this field" +msgstr "Une infobulle existe déjà pour ce champ" + +#. module: web_field_tooltip +#: model:ir.model.fields,field_description:web_field_tooltip.field_ir_model_fields_tooltip__active +msgid "Active" +msgstr "" + +#. module: web_field_tooltip +#: model_terms:ir.ui.view,arch_db:web_field_tooltip.ir_model_fields_tooltip_form_view +#: model_terms:ir.ui.view,arch_db:web_field_tooltip.ir_model_fields_tooltip_search_view +msgid "Archived" +msgstr "Archivé" + +#. module: web_field_tooltip +#: model:ir.model,name:web_field_tooltip.model_base +msgid "Base" +msgstr "" + +#. module: web_field_tooltip +#: model:ir.model.fields,field_description:web_field_tooltip.field_ir_model_fields_tooltip__create_uid +msgid "Created by" +msgstr "Créé par" + +#. module: web_field_tooltip +#: model:ir.model.fields,field_description:web_field_tooltip.field_ir_model_fields_tooltip__create_date +msgid "Created on" +msgstr "Créé le" + +#. module: web_field_tooltip +#: model:ir.model.fields,field_description:web_field_tooltip.field_ir_model_fields_tooltip__display_name +msgid "Display Name" +msgstr "Nom affiché" + +#. module: web_field_tooltip +#: model:ir.model.fields,field_description:web_field_tooltip.field_ir_model_fields_tooltip__field_id +msgid "Field" +msgstr "Champ" + +#. module: web_field_tooltip +#: model:ir.model.fields,field_description:web_field_tooltip.field_ir_model_fields_tooltip__field_name +msgid "Field Name" +msgstr "Nom de Champ" + +#. module: web_field_tooltip +#: model:ir.model,name:web_field_tooltip.model_ir_model_fields_tooltip +msgid "Field Tooltip" +msgstr "Infobulle de Champ" + +#. module: web_field_tooltip +#: model:ir.actions.act_window,name:web_field_tooltip.ir_model_fields_tooltip_act_window +#: model:ir.ui.menu,name:web_field_tooltip.ir_model_fields_tooltip_menu +msgid "Fields Tooltips" +msgstr "Infobulles" + +#. module: web_field_tooltip +#: model:ir.model,name:web_field_tooltip.model_ir_http +msgid "HTTP Routing" +msgstr "Routage HTTP" + +#. module: web_field_tooltip +#: model:ir.model.fields,field_description:web_field_tooltip.field_ir_model_fields_tooltip__id +msgid "ID" +msgstr "" + +#. module: web_field_tooltip +#: model:ir.model.fields,field_description:web_field_tooltip.field_ir_model_fields_tooltip__write_uid +msgid "Last Updated by" +msgstr "Dernière mise à jour par" + +#. module: web_field_tooltip +#: model:ir.model.fields,field_description:web_field_tooltip.field_ir_model_fields_tooltip__write_date +msgid "Last Updated on" +msgstr "Dernière mise à jour le" + +#. module: web_field_tooltip +#. odoo-javascript +#: code:addons/web_field_tooltip/static/src/views/form/form_controller.esm.js:0 +#, python-format +msgid "Manage tooltips" +msgstr "Gestion des infobulles" + +#. module: web_field_tooltip +#: model:ir.model.fields,field_description:web_field_tooltip.field_ir_model_fields_tooltip__model_id +msgid "Model" +msgstr "Modèle" + +#. module: web_field_tooltip +#: model:ir.model.fields,field_description:web_field_tooltip.field_ir_model_fields_tooltip__model +msgid "Model Name" +msgstr "Nom de Modèle" + +#. module: web_field_tooltip +#: model:ir.model.fields,help:web_field_tooltip.field_ir_model_fields_tooltip__model_id +msgid "Model for the Field Tooltip." +msgstr "Modèle pour l'Infobulle de Champ" + +#. module: web_field_tooltip +#: model:ir.model.fields,field_description:web_field_tooltip.field_ir_model_fields_tooltip__name +msgid "Name" +msgstr "Nom" + +#. module: web_field_tooltip +#: model:ir.model.fields,help:web_field_tooltip.field_ir_model_fields_tooltip__active +msgid "Set active to false to hide the Tooltip without removing it." +msgstr "" +"Mettre le champ actif à faux pour masquer l'Infobulle sans la supprimer." + +#. module: web_field_tooltip +#: model:ir.model.fields,field_description:web_field_tooltip.field_res_users__tooltip_show_add_helper +msgid "Show helper to add tooltips on fields" +msgstr "Afficher l'aide pour l'ajout des infobulles sur les champs" + +#. module: web_field_tooltip +#: model:res.groups,comment:web_field_tooltip.group_tooltip_manager +msgid "The user will be able to manage all the tooltips." +msgstr "L'utilisateur pourra gérer toutes les infobulles." + +#. module: web_field_tooltip +#: model:res.groups,name:web_field_tooltip.group_tooltip_manager +msgid "Tooltip Manager" +msgstr "Gestionnaire des infobulles" + +#. module: web_field_tooltip +#: model:ir.model.fields,field_description:web_field_tooltip.field_res_users__tooltip_show_add_helper_allowed +msgid "Tooltip Show Add Helper Allowed" +msgstr "" + +#. module: web_field_tooltip +#: model:ir.model.fields,field_description:web_field_tooltip.field_ir_model_fields_tooltip__tooltip_text +msgid "Tooltip Text" +msgstr "Texte de l'Infobulle" + +#. module: web_field_tooltip +#: model:ir.model,name:web_field_tooltip.model_res_users +msgid "User" +msgstr "" + +#~ msgid "Last Modified on" +#~ msgstr "Dernière modification le" + +#, python-format +#~ msgid "Add a Tooltip" +#~ msgstr "Ajouter une infobulle" + +#, python-format +#~ msgid "Edit a Tooltip" +#~ msgstr "Modifier une infobulle" + +#, python-format +#~ msgid "Edit the tooltip" +#~ msgstr "Modifier l'infobulle" + +#, python-format +#~ msgid "Last Updated by: " +#~ msgstr "Dernière mise à jour par " + +#, python-format +#~ msgid "Manage Tooltips" +#~ msgstr "Gérer les Infobulles" + +#~ msgid "Users" +#~ msgstr "Utilisateurs" diff --git a/web_field_tooltip/i18n/it.po b/web_field_tooltip/i18n/it.po new file mode 100644 index 000000000000..d0cf8df9e4e7 --- /dev/null +++ b/web_field_tooltip/i18n/it.po @@ -0,0 +1,162 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_field_tooltip +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2024-04-23 14: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_field_tooltip +#. odoo-python +#: code:addons/web_field_tooltip/models/ir_model_fields_tooltip.py:0 +#, python-format +msgid "A tooltip already exists for this field" +msgstr "Esiste già una descrizione per questo campo" + +#. module: web_field_tooltip +#: model:ir.model.fields,field_description:web_field_tooltip.field_ir_model_fields_tooltip__active +msgid "Active" +msgstr "Attivo" + +#. module: web_field_tooltip +#: model_terms:ir.ui.view,arch_db:web_field_tooltip.ir_model_fields_tooltip_form_view +#: model_terms:ir.ui.view,arch_db:web_field_tooltip.ir_model_fields_tooltip_search_view +msgid "Archived" +msgstr "In archivio" + +#. module: web_field_tooltip +#: model:ir.model,name:web_field_tooltip.model_base +msgid "Base" +msgstr "Base" + +#. module: web_field_tooltip +#: model:ir.model.fields,field_description:web_field_tooltip.field_ir_model_fields_tooltip__create_uid +msgid "Created by" +msgstr "Creato da" + +#. module: web_field_tooltip +#: model:ir.model.fields,field_description:web_field_tooltip.field_ir_model_fields_tooltip__create_date +msgid "Created on" +msgstr "Creato il" + +#. module: web_field_tooltip +#: model:ir.model.fields,field_description:web_field_tooltip.field_ir_model_fields_tooltip__display_name +msgid "Display Name" +msgstr "Nome visualizzato" + +#. module: web_field_tooltip +#: model:ir.model.fields,field_description:web_field_tooltip.field_ir_model_fields_tooltip__field_id +msgid "Field" +msgstr "Campo" + +#. module: web_field_tooltip +#: model:ir.model.fields,field_description:web_field_tooltip.field_ir_model_fields_tooltip__field_name +msgid "Field Name" +msgstr "Nome campo" + +#. module: web_field_tooltip +#: model:ir.model,name:web_field_tooltip.model_ir_model_fields_tooltip +msgid "Field Tooltip" +msgstr "Descrizione campo" + +#. module: web_field_tooltip +#: model:ir.actions.act_window,name:web_field_tooltip.ir_model_fields_tooltip_act_window +#: model:ir.ui.menu,name:web_field_tooltip.ir_model_fields_tooltip_menu +msgid "Fields Tooltips" +msgstr "Descrizioni campi" + +#. module: web_field_tooltip +#: model:ir.model,name:web_field_tooltip.model_ir_http +msgid "HTTP Routing" +msgstr "Instradamento HTTP" + +#. module: web_field_tooltip +#: model:ir.model.fields,field_description:web_field_tooltip.field_ir_model_fields_tooltip__id +msgid "ID" +msgstr "ID" + +#. module: web_field_tooltip +#: model:ir.model.fields,field_description:web_field_tooltip.field_ir_model_fields_tooltip__write_uid +msgid "Last Updated by" +msgstr "Ultimo aggiornamento di" + +#. module: web_field_tooltip +#: model:ir.model.fields,field_description:web_field_tooltip.field_ir_model_fields_tooltip__write_date +msgid "Last Updated on" +msgstr "Ultimo aggiornamento il" + +#. module: web_field_tooltip +#. odoo-javascript +#: code:addons/web_field_tooltip/static/src/views/form/form_controller.esm.js:0 +#, python-format +msgid "Manage tooltips" +msgstr "Gestione descrizioni" + +#. module: web_field_tooltip +#: model:ir.model.fields,field_description:web_field_tooltip.field_ir_model_fields_tooltip__model_id +msgid "Model" +msgstr "Modello" + +#. module: web_field_tooltip +#: model:ir.model.fields,field_description:web_field_tooltip.field_ir_model_fields_tooltip__model +msgid "Model Name" +msgstr "Nome modello" + +#. module: web_field_tooltip +#: model:ir.model.fields,help:web_field_tooltip.field_ir_model_fields_tooltip__model_id +msgid "Model for the Field Tooltip." +msgstr "Modello per la descrizione campo." + +#. module: web_field_tooltip +#: model:ir.model.fields,field_description:web_field_tooltip.field_ir_model_fields_tooltip__name +msgid "Name" +msgstr "Nome" + +#. module: web_field_tooltip +#: model:ir.model.fields,help:web_field_tooltip.field_ir_model_fields_tooltip__active +msgid "Set active to false to hide the Tooltip without removing it." +msgstr "" +"Impostare attiva a falso per nascondere la descrizione senza eleiminarla." + +#. module: web_field_tooltip +#: model:ir.model.fields,field_description:web_field_tooltip.field_res_users__tooltip_show_add_helper +msgid "Show helper to add tooltips on fields" +msgstr "Visualizza aiuto per aggiungere la descrizione sui campi" + +#. module: web_field_tooltip +#: model:res.groups,comment:web_field_tooltip.group_tooltip_manager +msgid "The user will be able to manage all the tooltips." +msgstr "L'utente potrà gestire tutte le descrizioni." + +#. module: web_field_tooltip +#: model:res.groups,name:web_field_tooltip.group_tooltip_manager +msgid "Tooltip Manager" +msgstr "Gestore descrizioni" + +#. module: web_field_tooltip +#: model:ir.model.fields,field_description:web_field_tooltip.field_res_users__tooltip_show_add_helper_allowed +msgid "Tooltip Show Add Helper Allowed" +msgstr "Consentito visualizzare aggiunta aiuto descrizione" + +#. module: web_field_tooltip +#: model:ir.model.fields,field_description:web_field_tooltip.field_ir_model_fields_tooltip__tooltip_text +msgid "Tooltip Text" +msgstr "Testo descrizione" + +#. module: web_field_tooltip +#: model:ir.model,name:web_field_tooltip.model_res_users +msgid "User" +msgstr "Utente" + +#~ msgid "Last Modified on" +#~ msgstr "Ultima modifica il" diff --git a/web_field_tooltip/i18n/web_field_tooltip.pot b/web_field_tooltip/i18n/web_field_tooltip.pot new file mode 100644 index 000000000000..a4da508b9f2a --- /dev/null +++ b/web_field_tooltip/i18n/web_field_tooltip.pot @@ -0,0 +1,155 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_field_tooltip +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 17.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_field_tooltip +#. odoo-python +#: code:addons/web_field_tooltip/models/ir_model_fields_tooltip.py:0 +#, python-format +msgid "A tooltip already exists for this field" +msgstr "" + +#. module: web_field_tooltip +#: model:ir.model.fields,field_description:web_field_tooltip.field_ir_model_fields_tooltip__active +msgid "Active" +msgstr "" + +#. module: web_field_tooltip +#: model_terms:ir.ui.view,arch_db:web_field_tooltip.ir_model_fields_tooltip_form_view +#: model_terms:ir.ui.view,arch_db:web_field_tooltip.ir_model_fields_tooltip_search_view +msgid "Archived" +msgstr "" + +#. module: web_field_tooltip +#: model:ir.model,name:web_field_tooltip.model_base +msgid "Base" +msgstr "" + +#. module: web_field_tooltip +#: model:ir.model.fields,field_description:web_field_tooltip.field_ir_model_fields_tooltip__create_uid +msgid "Created by" +msgstr "" + +#. module: web_field_tooltip +#: model:ir.model.fields,field_description:web_field_tooltip.field_ir_model_fields_tooltip__create_date +msgid "Created on" +msgstr "" + +#. module: web_field_tooltip +#: model:ir.model.fields,field_description:web_field_tooltip.field_ir_model_fields_tooltip__display_name +msgid "Display Name" +msgstr "" + +#. module: web_field_tooltip +#: model:ir.model.fields,field_description:web_field_tooltip.field_ir_model_fields_tooltip__field_id +msgid "Field" +msgstr "" + +#. module: web_field_tooltip +#: model:ir.model.fields,field_description:web_field_tooltip.field_ir_model_fields_tooltip__field_name +msgid "Field Name" +msgstr "" + +#. module: web_field_tooltip +#: model:ir.model,name:web_field_tooltip.model_ir_model_fields_tooltip +msgid "Field Tooltip" +msgstr "" + +#. module: web_field_tooltip +#: model:ir.actions.act_window,name:web_field_tooltip.ir_model_fields_tooltip_act_window +#: model:ir.ui.menu,name:web_field_tooltip.ir_model_fields_tooltip_menu +msgid "Fields Tooltips" +msgstr "" + +#. module: web_field_tooltip +#: model:ir.model,name:web_field_tooltip.model_ir_http +msgid "HTTP Routing" +msgstr "" + +#. module: web_field_tooltip +#: model:ir.model.fields,field_description:web_field_tooltip.field_ir_model_fields_tooltip__id +msgid "ID" +msgstr "" + +#. module: web_field_tooltip +#: model:ir.model.fields,field_description:web_field_tooltip.field_ir_model_fields_tooltip__write_uid +msgid "Last Updated by" +msgstr "" + +#. module: web_field_tooltip +#: model:ir.model.fields,field_description:web_field_tooltip.field_ir_model_fields_tooltip__write_date +msgid "Last Updated on" +msgstr "" + +#. module: web_field_tooltip +#. odoo-javascript +#: code:addons/web_field_tooltip/static/src/views/form/form_controller.esm.js:0 +#, python-format +msgid "Manage tooltips" +msgstr "" + +#. module: web_field_tooltip +#: model:ir.model.fields,field_description:web_field_tooltip.field_ir_model_fields_tooltip__model_id +msgid "Model" +msgstr "" + +#. module: web_field_tooltip +#: model:ir.model.fields,field_description:web_field_tooltip.field_ir_model_fields_tooltip__model +msgid "Model Name" +msgstr "" + +#. module: web_field_tooltip +#: model:ir.model.fields,help:web_field_tooltip.field_ir_model_fields_tooltip__model_id +msgid "Model for the Field Tooltip." +msgstr "" + +#. module: web_field_tooltip +#: model:ir.model.fields,field_description:web_field_tooltip.field_ir_model_fields_tooltip__name +msgid "Name" +msgstr "" + +#. module: web_field_tooltip +#: model:ir.model.fields,help:web_field_tooltip.field_ir_model_fields_tooltip__active +msgid "Set active to false to hide the Tooltip without removing it." +msgstr "" + +#. module: web_field_tooltip +#: model:ir.model.fields,field_description:web_field_tooltip.field_res_users__tooltip_show_add_helper +msgid "Show helper to add tooltips on fields" +msgstr "" + +#. module: web_field_tooltip +#: model:res.groups,comment:web_field_tooltip.group_tooltip_manager +msgid "The user will be able to manage all the tooltips." +msgstr "" + +#. module: web_field_tooltip +#: model:res.groups,name:web_field_tooltip.group_tooltip_manager +msgid "Tooltip Manager" +msgstr "" + +#. module: web_field_tooltip +#: model:ir.model.fields,field_description:web_field_tooltip.field_res_users__tooltip_show_add_helper_allowed +msgid "Tooltip Show Add Helper Allowed" +msgstr "" + +#. module: web_field_tooltip +#: model:ir.model.fields,field_description:web_field_tooltip.field_ir_model_fields_tooltip__tooltip_text +msgid "Tooltip Text" +msgstr "" + +#. module: web_field_tooltip +#: model:ir.model,name:web_field_tooltip.model_res_users +msgid "User" +msgstr "" diff --git a/web_field_tooltip/migrations/17.0.1.0.0/post-migrate.py b/web_field_tooltip/migrations/17.0.1.0.0/post-migrate.py new file mode 100644 index 000000000000..fb8b42767505 --- /dev/null +++ b/web_field_tooltip/migrations/17.0.1.0.0/post-migrate.py @@ -0,0 +1,12 @@ +# Copyright 2024 Manuel Regidor +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import SUPERUSER_ID, api +from odoo.tools import html2plaintext + + +def migrate(cr, version): + env = api.Environment(cr, SUPERUSER_ID, {}) + tooltips = env["ir.model.fields.tooltip"].search([]) + for tooltip in tooltips: + tooltip.write({"tooltip_text": html2plaintext(tooltip.tooltip_text)}) diff --git a/web_field_tooltip/models/__init__.py b/web_field_tooltip/models/__init__.py new file mode 100644 index 000000000000..a5c939c73856 --- /dev/null +++ b/web_field_tooltip/models/__init__.py @@ -0,0 +1,4 @@ +from . import base +from . import ir_http +from . import ir_model_fields_tooltip +from . import res_users diff --git a/web_field_tooltip/models/base.py b/web_field_tooltip/models/base.py new file mode 100644 index 000000000000..c272a73292f9 --- /dev/null +++ b/web_field_tooltip/models/base.py @@ -0,0 +1,29 @@ +# Copyright 2023 ACSONE SA/NV +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + + +from odoo import api, models + + +class Base(models.AbstractModel): + _inherit = "base" + + @api.model + def fields_get(self, allfields=None, attributes=None): + res = super().fields_get(allfields=allfields, attributes=attributes) + fnames = res.keys() + tooltips_data = ( + self.env["ir.model.fields.tooltip"] + .sudo() + .search_read( + [ + ("model", "=", self._name), + ("field_name", "in", list(fnames)), + ], + [], + ) + ) + for tooltip_data in tooltips_data: + tooltip_fname = tooltip_data["field_name"] + res[tooltip_fname]["field_tooltip"] = tooltip_data + return res diff --git a/web_field_tooltip/models/ir_http.py b/web_field_tooltip/models/ir_http.py new file mode 100644 index 000000000000..b5c8f6d373d2 --- /dev/null +++ b/web_field_tooltip/models/ir_http.py @@ -0,0 +1,19 @@ +# Copyright 2023 ACSONE SA/NV +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import models + + +class Http(models.AbstractModel): + _inherit = "ir.http" + + def session_info(self): + result = super().session_info() + user = self.env.user + result.update( + { + "can_manage_tooltips": user._is_tooltip_manager(), + "tooltip_show_add_helper": user.tooltip_show_add_helper, + } + ) + return result diff --git a/web_field_tooltip/models/ir_model_fields_tooltip.py b/web_field_tooltip/models/ir_model_fields_tooltip.py new file mode 100644 index 000000000000..017f954504a8 --- /dev/null +++ b/web_field_tooltip/models/ir_model_fields_tooltip.py @@ -0,0 +1,76 @@ +# Copyright 2023 ACSONE SA/NV +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import _, api, fields, models +from odoo.exceptions import UserError + + +class IrModelFieldsTooltip(models.Model): + _name = "ir.model.fields.tooltip" + _description = "Field Tooltip" + + model_id = fields.Many2one( + string="Model", + comodel_name="ir.model", + ondelete="cascade", + required=True, + help="Model for the Field Tooltip.", + default=lambda self: self._get_default_model_id(), + ) + model = fields.Char(related="model_id.model", string="Model Name", store=True) + field_id = fields.Many2one( + string="Field", + required=True, + comodel_name="ir.model.fields", + ondelete="cascade", + ) + field_name = fields.Char(related="field_id.name", store=True) + name = fields.Char( + compute="_compute_name", + readonly=True, + ) + active = fields.Boolean( + default=True, + help="Set active to false to hide the Tooltip without removing it.", + ) + field_name = fields.Char(related="field_id.name") + tooltip_text = fields.Text(required=True, translate=True) + + @api.model + def default_get(self, fields_list): + res = super().default_get(fields_list) + context = self.env.context + default_model = context.get("default_model") + default_field = context.get("default_field_name") + if default_model and default_field: + field = self.env["ir.model.fields"].search( + [("model_id.model", "=", default_model), ("name", "=", default_field)], + limit=1, + ) + res.update({"model_id": field.model_id.id, "field_id": field.id}) + return res + + @api.constrains("model_id", "field_id") + def _check_duplicate_tooltip(self): + all_self = self.with_context(active_test=False) + for rec in self: + if all_self.search( + [ + ("model_id", "=", rec.model_id.id), + ("field_id", "=", rec.field_id.id), + ("id", "!=", rec.id), + ] + ): + raise UserError(_("A tooltip already exists for this field")) + + def _get_default_model_id(self): + tooltip_model = self.env.context.get("default_model") + model = self.env["ir.model"].search([("model", "=", tooltip_model)], limit=1) + return model.id or False + + @api.depends("model_id", "field_id") + def _compute_name(self): + for tooltip in self: + tooltip.name = "Tooltip for {} on {}".format( + tooltip.field_id.name, tooltip.model_id.name + ) diff --git a/web_field_tooltip/models/res_users.py b/web_field_tooltip/models/res_users.py new file mode 100644 index 000000000000..7796da9aa7de --- /dev/null +++ b/web_field_tooltip/models/res_users.py @@ -0,0 +1,37 @@ +# Copyright 2023 ACSONE SA/NV +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import fields, models + +TOOLTIP_MANAGER_GROUP = "web_field_tooltip.group_tooltip_manager" + + +class ResUsers(models.Model): + _inherit = "res.users" + + tooltip_show_add_helper = fields.Boolean( + string="Show helper to add tooltips on fields", + ) + tooltip_show_add_helper_allowed = fields.Boolean( + compute="_compute_tooltip_show_add_helper_allowed" + ) + + @property + def TOOLTIP_READABLE_FIELDS(self): + return ["tooltip_show_add_helper"] + + @property + def SELF_READABLE_FIELDS(self): + return super().SELF_READABLE_FIELDS + self.TOOLTIP_READABLE_FIELDS + + @property + def SELF_WRITEABLE_FIELDS(self): + return super().SELF_WRITEABLE_FIELDS + self.TOOLTIP_READABLE_FIELDS + + def _compute_tooltip_show_add_helper_allowed(self): + for rec in self: + rec.tooltip_show_add_helper_allowed = rec._is_tooltip_manager() + + def _is_tooltip_manager(self): + self.ensure_one() + return self.has_group(TOOLTIP_MANAGER_GROUP) diff --git a/web_field_tooltip/pyproject.toml b/web_field_tooltip/pyproject.toml new file mode 100644 index 000000000000..4231d0cccb3d --- /dev/null +++ b/web_field_tooltip/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/web_field_tooltip/readme/CONTRIBUTORS.md b/web_field_tooltip/readme/CONTRIBUTORS.md new file mode 100644 index 000000000000..63f95fd766ac --- /dev/null +++ b/web_field_tooltip/readme/CONTRIBUTORS.md @@ -0,0 +1,6 @@ +- Benoit Aimont \<\> () + +- [Sygel](https://sygel.es): + - Manuel Regidor \<\> + - Harald Panten \<\> + - Valentín Vinagre \<\> diff --git a/web_field_tooltip/readme/DESCRIPTION.md b/web_field_tooltip/readme/DESCRIPTION.md new file mode 100644 index 000000000000..6ef5a1b9b261 --- /dev/null +++ b/web_field_tooltip/readme/DESCRIPTION.md @@ -0,0 +1,2 @@ +This module gives the possibility to add tooltips next to fields labels +on any field of a model. diff --git a/web_field_tooltip/readme/ROADMAP.md b/web_field_tooltip/readme/ROADMAP.md new file mode 100644 index 000000000000..ccc72cda6b95 --- /dev/null +++ b/web_field_tooltip/readme/ROADMAP.md @@ -0,0 +1,2 @@ +- Find a way to update form views after tooltips update without + refreshing manually diff --git a/web_field_tooltip/readme/USAGE.md b/web_field_tooltip/readme/USAGE.md new file mode 100644 index 000000000000..80804230b373 --- /dev/null +++ b/web_field_tooltip/readme/USAGE.md @@ -0,0 +1,11 @@ +To use this module, you need to: + +- Go to Settings / Technical / Database Structure / Fields Tooltips and + configure tooltips for a field for a model. You will then be able to + see on the form view of the model you chose, next to the label of the + field you selected, the tooltip appear. +- You can also go directly on the form view of a model on which you want + to add a tooltip and use the Manage tooltips Action to add a new + tooltip, or edit or delete existing tooltips for this model. +- For manager users, they can decide to display a helper to add a + tooltip on a field as some fields are not displayed with a label. diff --git a/web_field_tooltip/security/ir_model_access.xml b/web_field_tooltip/security/ir_model_access.xml new file mode 100644 index 000000000000..d9c36df9899b --- /dev/null +++ b/web_field_tooltip/security/ir_model_access.xml @@ -0,0 +1,46 @@ + + + + + + ir.model.fields.tooltip access reader + + + + + + + + + + ir.model.fields.tooltip access user + + + + + + + + + + ir.model access reader + + + + + + + + + + ir.model.fields access reader + + + + + + + + + diff --git a/web_field_tooltip/security/res_groups.xml b/web_field_tooltip/security/res_groups.xml new file mode 100644 index 000000000000..fc9b875be69c --- /dev/null +++ b/web_field_tooltip/security/res_groups.xml @@ -0,0 +1,16 @@ + + + + + + Tooltip Manager + + The user will be able to manage all the tooltips. + + + + diff --git a/web_field_tooltip/static/description/icon.png b/web_field_tooltip/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..3a0328b516c4980e8e44cdb63fd945757ddd132d GIT binary patch literal 9455 zcmW++2RxMjAAjx~&dlBk9S+%}OXg)AGE&Cb*&}d0jUxM@u(PQx^-s)697TX`ehR4?GS^qbkof1cslKgkU)h65qZ9Oc=ml_0temigYLJfnz{IDzUf>bGs4N!v3=Z3jMq&A#7%rM5eQ#dc?k~! zVpnB`o+K7|Al`Q_U;eD$B zfJtP*jH`siUq~{KE)`jP2|#TUEFGRryE2`i0**z#*^6~AI|YzIWy$Cu#CSLW3q=GA z6`?GZymC;dCPk~rBS%eCb`5OLr;RUZ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Z$BdI?fpoCS$)t4mg4rT8Q_I}h`0d-vYZ^|dOB*Q^S|xqTV*vIg?@fVFSmMpaw0qtTRbx} z({Pg?#{2`sc9)M5N$*N|4;^t$+QP?#mov zGVC@I*lBVrOU-%2y!7%)fAKjpEFsgQc4{amtiHb95KQEwvf<(3T<9-Zm$xIew#P22 zc2Ix|App^>v6(3L_MCU0d3W##AB0M~3D00EWoKZqsJYT(#@w$Y_H7G22M~ApVFTRHMI_3be)Lkn#0F*V8Pq zc}`Cjy$bE;FJ6H7p=0y#R>`}-m4(0F>%@P|?7fx{=R^uFdISRnZ2W_xQhD{YuR3t< z{6yxu=4~JkeA;|(J6_nv#>Nvs&FuLA&PW^he@t(UwFFE8)|a!R{`E`K`i^ZnyE4$k z;(749Ix|oi$c3QbEJ3b~D_kQsPz~fIUKym($a_7dJ?o+40*OLl^{=&oq$<#Q(yyrp z{J-FAniyAw9tPbe&IhQ|a`DqFTVQGQ&Gq3!C2==4x{6EJwiPZ8zub-iXoUtkJiG{} zPaR&}_fn8_z~(=;5lD-aPWD3z8PZS@AaUiomF!G8I}Mf>e~0g#BelA-5#`cj;O5>N Xviia!U7SGha1wx#SCgwmn*{w2TRX*I literal 0 HcmV?d00001 diff --git a/web_field_tooltip/static/description/index.html b/web_field_tooltip/static/description/index.html new file mode 100644 index 000000000000..379f2851afa0 --- /dev/null +++ b/web_field_tooltip/static/description/index.html @@ -0,0 +1,454 @@ + + + + + +Web Field Tooltip + + + +
+

Web Field Tooltip

+ + +

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

+

This module gives the possibility to add tooltips next to fields labels +on any field of a model.

+

Table of contents

+ +
+

Usage

+

To use this module, you need to:

+
    +
  • Go to Settings / Technical / Database Structure / Fields Tooltips and +configure tooltips for a field for a model. You will then be able to +see on the form view of the model you chose, next to the label of the +field you selected, the tooltip appear.
  • +
  • You can also go directly on the form view of a model on which you +want to add a tooltip and use the Manage tooltips Action to add a new +tooltip, or edit or delete existing tooltips for this model.
  • +
  • For manager users, they can decide to display a helper to add a +tooltip on a field as some fields are not displayed with a label.
  • +
+
+
+

Known issues / Roadmap

+
    +
  • Find a way to update form views after tooltips update without +refreshing manually
  • +
+
+
+

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
  • +
+
+
+

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_field_tooltip/static/src/views/form/form_controller.esm.js b/web_field_tooltip/static/src/views/form/form_controller.esm.js new file mode 100644 index 000000000000..d10f9a7b1d70 --- /dev/null +++ b/web_field_tooltip/static/src/views/form/form_controller.esm.js @@ -0,0 +1,36 @@ +/** @odoo-module **/ + +import {FormController} from "@web/views/form/form_controller"; +import {_t} from "@web/core/l10n/translation"; +import {patch} from "@web/core/utils/patch"; +import {session} from "@web/session"; + +const web_field_tooltip = { + get actionMenuItems() { + const menuItems = super.actionMenuItems; + const otherMenuItems = menuItems.action; + if (session.can_manage_tooltips) { + otherMenuItems.push({ + key: "manage_tooltips", + description: _t("Manage tooltips"), + callback: () => this.manageTooltips(), + }); + } + return menuItems; + }, + + manageTooltips() { + const model = this.props.resModel; + this.env.services.action.doAction( + "web_field_tooltip.ir_model_fields_tooltip_act_window", + { + additionalContext: { + search_default_model: model, + default_model: model, + }, + } + ); + }, +}; + +patch(FormController.prototype, web_field_tooltip); diff --git a/web_field_tooltip/static/src/views/form/form_label.esm.js b/web_field_tooltip/static/src/views/form/form_label.esm.js new file mode 100644 index 000000000000..3ae0abdbf995 --- /dev/null +++ b/web_field_tooltip/static/src/views/form/form_label.esm.js @@ -0,0 +1,88 @@ +/** @odoo-module **/ + +import {FormLabel} from "@web/views/form/form_label"; +import {FormViewDialog} from "@web/views/view_dialogs/form_view_dialog"; +import {patch} from "@web/core/utils/patch"; +import {session} from "@web/session"; +import {useService} from "@web/core/utils/hooks"; + +const web_field_tooltip = { + setup() { + super.setup(); + this.canManageTooltip = session.can_manage_tooltips; + if (session.can_manage_tooltips) { + this.dialogService = useService("dialog"); + } + }, + + get showTooltipAddHelper() { + return session.tooltip_show_add_helper; + }, + + get hasFieldTooltip() { + const props = this.props; + return Boolean(props.record.fields[props.fieldName].field_tooltip); + }, + + get tooltipHelp() { + let help = super.tooltipHelp; + const field = this.props.record.fields[this.props.fieldName]; + if (field.field_tooltip) { + help = [help, field.field_tooltip.tooltip_text].filter((x) => x).join("\n"); + } + return help; + }, + + get hasTooltip() { + let has_too_tip = super.hasTooltip; + if (this.showTooltipAddHelper && !has_too_tip) { + has_too_tip = true; + } + return has_too_tip; + }, + + get tooltipInfo() { + if (odoo.debug) { + if (this.hasFieldTooltip) { + const field = this.props.record.fields[this.props.fieldName]; + if (this.props.fieldInfo.help) { + this.props.fieldInfo.help = [ + this.props.fieldInfo.help, + field.field_tooltip.tooltip_text, + ] + .filter((x) => x) + .join("\n"); + } else { + this.props.record.fields[this.props.fieldName].help = [ + field.help, + field.field_tooltip.tooltip_text, + ] + .filter((x) => x) + .join("\n"); + } + } + } + return super.tooltipInfo; + }, + + onClickTooltip(ev) { + ev.preventDefault(); + ev.stopPropagation(); + if (!this.canManageTooltip) { + return; + } + const field = this.props.record.fields[this.props.fieldName]; + const fieldTooltip = field.field_tooltip; + const tooltipId = (fieldTooltip && fieldTooltip.id) || false; + this.dialogService.add(FormViewDialog, { + resModel: "ir.model.fields.tooltip", + resId: tooltipId, + context: { + default_model: this.props.record.resModel, + default_field_name: field.name, + }, + }); + }, +}; + +patch(FormLabel.prototype, web_field_tooltip); diff --git a/web_field_tooltip/static/src/views/form/form_label.xml b/web_field_tooltip/static/src/views/form/form_label.xml new file mode 100644 index 000000000000..70bfdcb82da3 --- /dev/null +++ b/web_field_tooltip/static/src/views/form/form_label.xml @@ -0,0 +1,15 @@ + + + + + + (ev) => this.onClickTooltip(ev) + + + + diff --git a/web_field_tooltip/tests/__init__.py b/web_field_tooltip/tests/__init__.py new file mode 100644 index 000000000000..deb30ec0944d --- /dev/null +++ b/web_field_tooltip/tests/__init__.py @@ -0,0 +1 @@ +from . import test_web_field_tooltip diff --git a/web_field_tooltip/tests/test_web_field_tooltip.py b/web_field_tooltip/tests/test_web_field_tooltip.py new file mode 100644 index 000000000000..66e9a1ef79a6 --- /dev/null +++ b/web_field_tooltip/tests/test_web_field_tooltip.py @@ -0,0 +1,48 @@ +# Copyright 2023 ACSONE SA/NV +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo.exceptions import UserError +from odoo.tests.common import Form, TransactionCase + + +class TestWebFieldTooltip(TransactionCase): + @classmethod + def setUpClass(cls): + super().setUpClass() + cls.Tooltip = cls.env["ir.model.fields.tooltip"] + cls.partner_model_name = "res.partner" + cls.partner_model = cls.env["ir.model"].search( + [("model", "=", cls.partner_model_name)] + ) + cls.email_partner_field = cls.env["ir.model.fields"].search( + [("model", "=", cls.partner_model_name), ("name", "=", "email")] + ) + cls.email_tooltip = cls.Tooltip.create( + { + "model_id": cls.partner_model.id, + "field_id": cls.email_partner_field.id, + "tooltip_text": "this explains a lot", + } + ) + + def test_duplicate_constrains(self): + with self.assertRaises(UserError) as e: + self.email_tooltip = self.Tooltip.create( + { + "model_id": self.partner_model.id, + "field_id": self.email_partner_field.id, + "tooltip_text": "this explains a lot", + } + ) + self.assertIn(e.exception.args[0], "A tooltip already exists for this field") + + def test_tooltip_name(self): + self.assertEqual( + self.email_tooltip.name, "Tooltip for {} on {}".format("email", "Contact") + ) + + def test_tooltip_model_id(self): + res_partner_form = Form( + self.Tooltip.with_context(default_model=self.partner_model_name) + ) + self.assertEqual(res_partner_form.model_id, self.partner_model) diff --git a/web_field_tooltip/views/ir_model_fields_tooltip.xml b/web_field_tooltip/views/ir_model_fields_tooltip.xml new file mode 100644 index 000000000000..a7ee60bbdd1d --- /dev/null +++ b/web_field_tooltip/views/ir_model_fields_tooltip.xml @@ -0,0 +1,85 @@ + + + + + + ir.model.fields.tooltip + + +
+ + + + + + + + + + + + + + + + + +
+
+
+ + + Fields Tooltips + ir.model.fields.tooltip + + + + + + + + + + + + + + ir.model.fields.tooltip + + + + + + + + + + Fields Tooltips + ir.model.fields.tooltip + tree,form + + + + Fields Tooltips + + + + +
diff --git a/web_field_tooltip/views/res_users.xml b/web_field_tooltip/views/res_users.xml new file mode 100644 index 000000000000..19572f8faec1 --- /dev/null +++ b/web_field_tooltip/views/res_users.xml @@ -0,0 +1,22 @@ + + + + + + res.users + + + + + + + + + + From 9fccfbe9f639577281c2207c413d6a97125610ad Mon Sep 17 00:00:00 2001 From: Holger Brunn Date: Tue, 17 Mar 2015 13:16:07 +0100 Subject: [PATCH 002/404] [ADD] web_ir_actions_act_window_message --- web_ir_actions_act_window_message/README.rst | 50 ++++++++++++++++++ web_ir_actions_act_window_message/__init__.py | 20 +++++++ .../__openerp__.py | 43 +++++++++++++++ .../static/description/icon.png | Bin 0 -> 2034 bytes .../js/web_ir_actions_act_window_message.js | 50 ++++++++++++++++++ .../xml/web_ir_actions_act_window_message.xml | 5 ++ .../views/templates.xml | 10 ++++ 7 files changed, 178 insertions(+) create mode 100644 web_ir_actions_act_window_message/README.rst create mode 100644 web_ir_actions_act_window_message/__init__.py create mode 100644 web_ir_actions_act_window_message/__openerp__.py create mode 100644 web_ir_actions_act_window_message/static/description/icon.png create mode 100644 web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js create mode 100644 web_ir_actions_act_window_message/static/src/xml/web_ir_actions_act_window_message.xml create mode 100644 web_ir_actions_act_window_message/views/templates.xml 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..58cf35af9687 --- /dev/null +++ b/web_ir_actions_act_window_message/README.rst @@ -0,0 +1,50 @@ +Client side message boxes +========================= + +This module allows to show a message popup on the client side as result of a button. + +Usage +===== + +Depend on this module and return + +.. code:: python + + { + 'type': 'ir.actions.act_window.message', + 'title': 'My title', + 'message': 'My message' + } + +You are responsible for translating the messages. + +* https://www.odoo.com/forum/help-1 + +Known issues / Roadmap +====================== + +* add `message_type` to differenciate between warnings, errors, etc. +* have one `message_type` to show a nonmodal warning on top right +* have `button_title` to set the button title +* have `buttons` containing button names and action definitions for triggering actions from the message box + +Credits +======= + +Contributors +------------ + +* Holger Brunn + +Maintainer +---------- + +.. image:: http://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: http://odoo-community.org + +This module is maintained by the OCA. + +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. + +To contribute to this module, please visit http://odoo-community.org. 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..faef9dac007f --- /dev/null +++ b/web_ir_actions_act_window_message/__init__.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# This module copyright (C) 2015 Therp BV . +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## diff --git a/web_ir_actions_act_window_message/__openerp__.py b/web_ir_actions_act_window_message/__openerp__.py new file mode 100644 index 000000000000..98f67900f32f --- /dev/null +++ b/web_ir_actions_act_window_message/__openerp__.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# This module copyright (C) 2015 Therp BV . +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## +{ + "name": "Client side message boxes", + "version": "1.0", + "author": "Therp BV", + "license": "AGPL-3", + "category": "Hidden/Dependency", + "summary": "Show a warning to users", + "depends": [ + 'web', + ], + "data": [ + 'views/templates.xml', + ], + "qweb": [ + 'static/src/xml/web_ir_actions_act_window_message.xml', + ], + "auto_install": False, + "installable": True, + "application": False, + "external_dependencies": { + 'python': [], + }, +} 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 0000000000000000000000000000000000000000..98965872769fff2e0a8aee1203260fcb8820eee6 GIT binary patch literal 2034 zcmVe zSad^gZEa<4bO1wgWnpw>WFU8GbZ8()Nlj2!fese{00&x0L_t(|+U=WNOjB7Nz<;;B zEtI0TfK)(b(L`vKEGk6|8kI!N#P~7~#+eLHhKGI7#E;C&JZ!R08;QO-iI0LWeniDY zvl_q=i7^A3!9|n`5eOeCTd*y(x3~9e9}pPlL)3AVspps6^!D`RHu>e8^Z%d!X+azxH7w zk>KRXlLUi7%FD~CtE*$hiWS)Hb{ZQSaXOtWUAmNph6eij`Y0?cXd85tSj&Ye5-^zty@{PY}uj`7z%~(csw{94nm<2>FMd%?e_N*D9bXX zrKJ=U6p)vfM@dNuH*b=enaT9@G`+pO?A*DN^z?MPySv%8Z5w{SpUKHd z^78VCMx#iQL}OzkE|-hy>S~6EhtYMN#kPH1zI-{7Bw<+=d3kvYjzkGyXlUr~d3kx? z|K5E65Oj2O@bu|ZDk>`Q`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`wI{Xh2-}3_J18Ya^ye4hCm. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . +// +//############################################################################ + +openerp.web_ir_actions_act_window_message = function(instance) +{ + instance.web.ActionManager.include({ + ir_actions_act_window_message: function(action, options) + { + var dialog = new instance.web.Dialog( + this, + { + size: 'medium', + title: action.title, + buttons: [ + { + text: instance.web._t('Close'), + click: function() { dialog.close() }, + oe_link_class: 'oe_highlight', + }, + ], + }, + jQuery(instance.web.qweb.render( + 'web_ir_actions_act_window_message', + { + 'this': this, + 'action': action, + })) + ) + return dialog.open(); + }, + }); +} 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..5f0742294ec2 --- /dev/null +++ b/web_ir_actions_act_window_message/static/src/xml/web_ir_actions_act_window_message.xml @@ -0,0 +1,5 @@ + +
+
+
+
diff --git a/web_ir_actions_act_window_message/views/templates.xml b/web_ir_actions_act_window_message/views/templates.xml new file mode 100644 index 000000000000..9ba42b0b2a76 --- /dev/null +++ b/web_ir_actions_act_window_message/views/templates.xml @@ -0,0 +1,10 @@ + + + + + + From ac5ade221e6d622185bcc6b5b123c78ddd77d551 Mon Sep 17 00:00:00 2001 From: Holger Brunn Date: Wed, 18 Mar 2015 10:26:00 +0100 Subject: [PATCH 003/404] [IMP] better readme, manifest --- web_ir_actions_act_window_message/README.rst | 6 ++---- web_ir_actions_act_window_message/__openerp__.py | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/web_ir_actions_act_window_message/README.rst b/web_ir_actions_act_window_message/README.rst index 58cf35af9687..c689471253c6 100644 --- a/web_ir_actions_act_window_message/README.rst +++ b/web_ir_actions_act_window_message/README.rst @@ -12,14 +12,12 @@ Depend on this module and return { 'type': 'ir.actions.act_window.message', - 'title': 'My title', - 'message': 'My message' + 'title': _('My title'), + 'message': _('My message'), } You are responsible for translating the messages. -* https://www.odoo.com/forum/help-1 - Known issues / Roadmap ====================== diff --git a/web_ir_actions_act_window_message/__openerp__.py b/web_ir_actions_act_window_message/__openerp__.py index 98f67900f32f..7cd5baaed44f 100644 --- a/web_ir_actions_act_window_message/__openerp__.py +++ b/web_ir_actions_act_window_message/__openerp__.py @@ -24,7 +24,7 @@ "author": "Therp BV", "license": "AGPL-3", "category": "Hidden/Dependency", - "summary": "Show a warning to users", + "summary": "Show a message box to users", "depends": [ 'web', ], From f331ccfef78908cd8891a55e7e7c238f72187621 Mon Sep 17 00:00:00 2001 From: Yannick Vaucher Date: Fri, 22 May 2015 19:45:36 +0200 Subject: [PATCH 004/404] Add bug tracker link on README.rst --- web_ir_actions_act_window_message/README.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/web_ir_actions_act_window_message/README.rst b/web_ir_actions_act_window_message/README.rst index c689471253c6..f330f0bfda1b 100644 --- a/web_ir_actions_act_window_message/README.rst +++ b/web_ir_actions_act_window_message/README.rst @@ -26,6 +26,16 @@ Known issues / Roadmap * have `button_title` to set the button title * have `buttons` containing button names and action definitions for triggering actions from the message box + +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 smashing it by providing a detailed and welcomed feedback +`here `_. + + Credits ======= From d49c0b760d2efbd740e1b5dfdd8d2f91762ae5a7 Mon Sep 17 00:00:00 2001 From: Markus Schneider Date: Thu, 4 Jun 2015 14:30:25 +0200 Subject: [PATCH 005/404] add OCA to author --- web_ir_actions_act_window_message/__openerp__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web_ir_actions_act_window_message/__openerp__.py b/web_ir_actions_act_window_message/__openerp__.py index 7cd5baaed44f..1cc57df0d732 100644 --- a/web_ir_actions_act_window_message/__openerp__.py +++ b/web_ir_actions_act_window_message/__openerp__.py @@ -21,7 +21,8 @@ { "name": "Client side message boxes", "version": "1.0", - "author": "Therp BV", + "author": "Therp BV, " + "Odoo Community Association (OCA)", "license": "AGPL-3", "category": "Hidden/Dependency", "summary": "Show a message box to users", From a2b6ae544bce63b1244a32e8c84106c30e72b988 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul?= Date: Fri, 9 Oct 2015 10:03:39 +0200 Subject: [PATCH 006/404] [UPD] prefix versions with 8.0 --- web_ir_actions_act_window_message/__openerp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web_ir_actions_act_window_message/__openerp__.py b/web_ir_actions_act_window_message/__openerp__.py index 1cc57df0d732..293f9f4de06b 100644 --- a/web_ir_actions_act_window_message/__openerp__.py +++ b/web_ir_actions_act_window_message/__openerp__.py @@ -20,7 +20,7 @@ ############################################################################## { "name": "Client side message boxes", - "version": "1.0", + "version": "8.0.1.0.0", "author": "Therp BV, " "Odoo Community Association (OCA)", "license": "AGPL-3", From e926e6b67b560dd8e3c06d65a48fd3bd9b9533b6 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Wed, 14 Oct 2015 02:57:05 +0200 Subject: [PATCH 007/404] [MIG] Make modules uninstallable --- web_ir_actions_act_window_message/__openerp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web_ir_actions_act_window_message/__openerp__.py b/web_ir_actions_act_window_message/__openerp__.py index 293f9f4de06b..7a553c520fe0 100644 --- a/web_ir_actions_act_window_message/__openerp__.py +++ b/web_ir_actions_act_window_message/__openerp__.py @@ -36,7 +36,7 @@ 'static/src/xml/web_ir_actions_act_window_message.xml', ], "auto_install": False, - "installable": True, + 'installable': False, "application": False, "external_dependencies": { 'python': [], From 4ee930de368ce67627be162156775dd1cd1e1636 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Thu, 6 Oct 2016 16:13:01 +0200 Subject: [PATCH 008/404] [MIG] Rename manifest files --- .../{__openerp__.py => __manifest__.py} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename web_ir_actions_act_window_message/{__openerp__.py => __manifest__.py} (100%) diff --git a/web_ir_actions_act_window_message/__openerp__.py b/web_ir_actions_act_window_message/__manifest__.py similarity index 100% rename from web_ir_actions_act_window_message/__openerp__.py rename to web_ir_actions_act_window_message/__manifest__.py From e7c86f45a6c152d8427f32e03a279b24d092dafe Mon Sep 17 00:00:00 2001 From: Holger Brunn Date: Thu, 3 Mar 2016 17:27:19 +0100 Subject: [PATCH 009/404] allow to pass a list of buttons --- web_ir_actions_act_window_message/README.rst | 25 ++++++++- .../js/web_ir_actions_act_window_message.js | 55 ++++++++++++++++++- 2 files changed, 77 insertions(+), 3 deletions(-) diff --git a/web_ir_actions_act_window_message/README.rst b/web_ir_actions_act_window_message/README.rst index f330f0bfda1b..8341746d54f6 100644 --- a/web_ir_actions_act_window_message/README.rst +++ b/web_ir_actions_act_window_message/README.rst @@ -14,6 +14,30 @@ Depend on this module and return 'type': 'ir.actions.act_window.message', 'title': _('My title'), 'message': _('My message'), + # 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}, + } + ] } You are responsible for translating the messages. @@ -24,7 +48,6 @@ Known issues / Roadmap * add `message_type` to differenciate between warnings, errors, etc. * have one `message_type` to show a nonmodal warning on top right * have `button_title` to set the button title -* have `buttons` containing button names and action definitions for triggering actions from the message box Bug Tracker diff --git a/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js b/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js index bfc6f55da62a..95f3b26d4db1 100644 --- a/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js +++ b/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js @@ -24,7 +24,8 @@ openerp.web_ir_actions_act_window_message = function(instance) instance.web.ActionManager.include({ ir_actions_act_window_message: function(action, options) { - var dialog = new instance.web.Dialog( + var self = this, + dialog = new instance.web.Dialog( this, { size: 'medium', @@ -35,7 +36,10 @@ openerp.web_ir_actions_act_window_message = function(instance) click: function() { dialog.close() }, oe_link_class: 'oe_highlight', }, - ], + ].concat( + this.ir_actions_act_window_message_get_buttons( + action, function() { dialog.close() }) + ), }, jQuery(instance.web.qweb.render( 'web_ir_actions_act_window_message', @@ -46,5 +50,52 @@ openerp.web_ir_actions_act_window_message = function(instance) ) return dialog.open(); }, + ir_actions_act_window_message_get_buttons: function(action, close_func) + { + // return an array of button definitions from action + var self = this; + return _.map(action.buttons || [], function(button_definition) + { + return { + text: button_definition.name || 'No name set', + oe_link_class: button_definition.oe_link_class || + 'oe_highlight', + click: function() { + if(button_definition.type == 'method') + { + (new instance.web.Model(button_definition.model)) + .call( + button_definition.method, + button_definition.args, + button_definition.kwargs + ).then(function(result) + { + if(_.isObject(result)) + { + self.do_action(result); + } + else + { + if( + self.inner_widget && + self.inner_widget.views + ) + { + self.inner_widget + .views[self.inner_widget.active_view] + .controller.recursive_reload(); + } + } + }); + } + else + { + self.do_action(button_definition); + } + close_func(); + }, + } + }); + }, }); } From e9a58115d57ad6aaf9db41e6f822a7dccb701983 Mon Sep 17 00:00:00 2001 From: Holger Brunn Date: Thu, 3 Mar 2016 17:38:57 +0100 Subject: [PATCH 010/404] implement close_button_title --- web_ir_actions_act_window_message/README.rst | 6 ++++- .../js/web_ir_actions_act_window_message.js | 22 ++++++++++++------- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/web_ir_actions_act_window_message/README.rst b/web_ir_actions_act_window_message/README.rst index 8341746d54f6..cc368bed834b 100644 --- a/web_ir_actions_act_window_message/README.rst +++ b/web_ir_actions_act_window_message/README.rst @@ -14,6 +14,11 @@ 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', # this is an optional list of buttons to show 'buttons': [ # a button can be any action (also ir.actions.report.xml et al) @@ -47,7 +52,6 @@ Known issues / Roadmap * add `message_type` to differenciate between warnings, errors, etc. * have one `message_type` to show a nonmodal warning on top right -* have `button_title` to set the button title Bug Tracker diff --git a/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js b/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js index 95f3b26d4db1..227cd67109a8 100644 --- a/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js +++ b/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js @@ -25,18 +25,24 @@ openerp.web_ir_actions_act_window_message = function(instance) ir_actions_act_window_message: function(action, options) { var self = this, - dialog = new instance.web.Dialog( + buttons = []; + + if(action.close_button_title !== false) + { + buttons.push({ + text: action.close_button_title || + instance.web._t('Close'), + click: function() { dialog.close() }, + oe_link_class: 'oe_highlight', + }) + } + + var dialog = new instance.web.Dialog( this, { size: 'medium', title: action.title, - buttons: [ - { - text: instance.web._t('Close'), - click: function() { dialog.close() }, - oe_link_class: 'oe_highlight', - }, - ].concat( + buttons: buttons.concat( this.ir_actions_act_window_message_get_buttons( action, function() { dialog.close() }) ), From 9f93890e15bd3f056fbad06431b11703e56bee15 Mon Sep 17 00:00:00 2001 From: OCA Transbot Date: Mon, 23 Nov 2015 23:43:23 -0500 Subject: [PATCH 011/404] OCA Transbot updated translations from Transifex --- web_ir_actions_act_window_message/i18n/ar.po | 25 ++++++++++++++++++ web_ir_actions_act_window_message/i18n/de.po | 26 +++++++++++++++++++ web_ir_actions_act_window_message/i18n/es.po | 26 +++++++++++++++++++ web_ir_actions_act_window_message/i18n/eu.po | 25 ++++++++++++++++++ web_ir_actions_act_window_message/i18n/fi.po | 25 ++++++++++++++++++ web_ir_actions_act_window_message/i18n/fr.po | 25 ++++++++++++++++++ web_ir_actions_act_window_message/i18n/hr.po | 25 ++++++++++++++++++ web_ir_actions_act_window_message/i18n/it.po | 25 ++++++++++++++++++ web_ir_actions_act_window_message/i18n/nl.po | 25 ++++++++++++++++++ .../i18n/pt_BR.po | 25 ++++++++++++++++++ web_ir_actions_act_window_message/i18n/sl.po | 25 ++++++++++++++++++ web_ir_actions_act_window_message/i18n/tr.po | 25 ++++++++++++++++++ 12 files changed, 302 insertions(+) create mode 100644 web_ir_actions_act_window_message/i18n/ar.po create mode 100644 web_ir_actions_act_window_message/i18n/de.po create mode 100644 web_ir_actions_act_window_message/i18n/es.po create mode 100644 web_ir_actions_act_window_message/i18n/eu.po create mode 100644 web_ir_actions_act_window_message/i18n/fi.po create mode 100644 web_ir_actions_act_window_message/i18n/fr.po create mode 100644 web_ir_actions_act_window_message/i18n/hr.po create mode 100644 web_ir_actions_act_window_message/i18n/it.po create mode 100644 web_ir_actions_act_window_message/i18n/nl.po create mode 100644 web_ir_actions_act_window_message/i18n/pt_BR.po create mode 100644 web_ir_actions_act_window_message/i18n/sl.po create mode 100644 web_ir_actions_act_window_message/i18n/tr.po 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..c2bc8c41de96 --- /dev/null +++ b/web_ir_actions_act_window_message/i18n/ar.po @@ -0,0 +1,25 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_ir_actions_act_window_message +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: web (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-12-16 07:41+0000\n" +"PO-Revision-Date: 2015-11-07 11:20+0000\n" +"Last-Translator: <>\n" +"Language-Team: Arabic (http://www.transifex.com/oca/OCA-web-8-0/language/ar/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: ar\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:34 +#, 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..1a53b6648dc2 --- /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: +# Rudolf Schnapka , 2016 +msgid "" +msgstr "" +"Project-Id-Version: web (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-01-10 07:31+0000\n" +"PO-Revision-Date: 2016-01-18 20:15+0000\n" +"Last-Translator: Rudolf Schnapka \n" +"Language-Team: German (http://www.transifex.com/oca/OCA-web-8-0/language/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: de\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:34 +#, 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..3b8d60e185cf --- /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: +# Antonio Trueba, 2016 +msgid "" +msgstr "" +"Project-Id-Version: web (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-01-10 07:31+0000\n" +"PO-Revision-Date: 2016-02-10 16:40+0000\n" +"Last-Translator: Antonio Trueba\n" +"Language-Team: Spanish (http://www.transifex.com/oca/OCA-web-8-0/language/es/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: es\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:34 +#, 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..5ff5a28f4b80 --- /dev/null +++ b/web_ir_actions_act_window_message/i18n/eu.po @@ -0,0 +1,25 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_ir_actions_act_window_message +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: web (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-02-18 09:01+0000\n" +"PO-Revision-Date: 2015-11-07 11:20+0000\n" +"Last-Translator: <>\n" +"Language-Team: Basque (http://www.transifex.com/oca/OCA-web-8-0/language/eu/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: eu\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:34 +#, 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..30cc25fc6856 --- /dev/null +++ b/web_ir_actions_act_window_message/i18n/fi.po @@ -0,0 +1,25 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_ir_actions_act_window_message +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: web (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-01-10 07:31+0000\n" +"PO-Revision-Date: 2015-11-07 11:20+0000\n" +"Last-Translator: <>\n" +"Language-Team: Finnish (http://www.transifex.com/oca/OCA-web-8-0/language/fi/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: fi\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:34 +#, 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..92af8cf48c12 --- /dev/null +++ b/web_ir_actions_act_window_message/i18n/fr.po @@ -0,0 +1,25 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_ir_actions_act_window_message +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: web (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-11-23 13:46+0000\n" +"PO-Revision-Date: 2015-11-07 11:20+0000\n" +"Last-Translator: <>\n" +"Language-Team: French (http://www.transifex.com/oca/OCA-web-8-0/language/fr/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: fr\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:34 +#, 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..6fdf3b7eb407 --- /dev/null +++ b/web_ir_actions_act_window_message/i18n/hr.po @@ -0,0 +1,25 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_ir_actions_act_window_message +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: web (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-06-24 00:46+0000\n" +"PO-Revision-Date: 2015-11-07 11:20+0000\n" +"Last-Translator: <>\n" +"Language-Team: Croatian (http://www.transifex.com/oca/OCA-web-8-0/language/hr/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: hr\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:34 +#, 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..108201e809ba --- /dev/null +++ b/web_ir_actions_act_window_message/i18n/it.po @@ -0,0 +1,25 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_ir_actions_act_window_message +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: web (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-03-17 07:29+0000\n" +"PO-Revision-Date: 2015-11-07 11:20+0000\n" +"Last-Translator: <>\n" +"Language-Team: Italian (http://www.transifex.com/oca/OCA-web-8-0/language/it/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: it\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:34 +#, 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..67049ccfe75d --- /dev/null +++ b/web_ir_actions_act_window_message/i18n/nl.po @@ -0,0 +1,25 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_ir_actions_act_window_message +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: web (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-01-21 08:52+0000\n" +"PO-Revision-Date: 2015-11-07 11:20+0000\n" +"Last-Translator: <>\n" +"Language-Team: Dutch (http://www.transifex.com/oca/OCA-web-8-0/language/nl/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: nl\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:34 +#, python-format +msgid "Close" +msgstr "Sluiten" 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..dd6d8167ea9f --- /dev/null +++ b/web_ir_actions_act_window_message/i18n/pt_BR.po @@ -0,0 +1,25 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_ir_actions_act_window_message +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: web (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-03-11 02:17+0000\n" +"PO-Revision-Date: 2016-03-05 16:20+0000\n" +"Last-Translator: danimaribeiro \n" +"Language-Team: Portuguese (Brazil) (http://www.transifex.com/oca/OCA-web-8-0/language/pt_BR/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: pt_BR\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:34 +#, python-format +msgid "Close" +msgstr "Fechar" 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..63ddbc003dd7 --- /dev/null +++ b/web_ir_actions_act_window_message/i18n/sl.po @@ -0,0 +1,25 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_ir_actions_act_window_message +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: web (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-11-23 13:46+0000\n" +"PO-Revision-Date: 2015-11-08 05:45+0000\n" +"Last-Translator: Matjaž Mozetič \n" +"Language-Team: Slovenian (http://www.transifex.com/oca/OCA-web-8-0/language/sl/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: sl\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:34 +#, 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..7d4493a4fe83 --- /dev/null +++ b/web_ir_actions_act_window_message/i18n/tr.po @@ -0,0 +1,25 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_ir_actions_act_window_message +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: web (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-01-08 21:34+0000\n" +"PO-Revision-Date: 2015-12-30 22:16+0000\n" +"Last-Translator: Ahmet Altınışık \n" +"Language-Team: Turkish (http://www.transifex.com/oca/OCA-web-8-0/language/tr/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: tr\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:34 +#, python-format +msgid "Close" +msgstr "Kapat" From 8bc3116a408522be9366cb12d3a8b94231e5ef47 Mon Sep 17 00:00:00 2001 From: Zakaria Makrelouf Date: Tue, 25 Apr 2017 13:15:01 +0100 Subject: [PATCH 012/404] web_ir_actions_act_window_message: Migration to V9 * Update the module version to 9.0. * Align file header to the OCA Guidelines. * Migrate Javascript file to the V9 API. * Refresh the view before closing the dialog when clicking on close button --- web_ir_actions_act_window_message/README.rst | 1 + web_ir_actions_act_window_message/__init__.py | 20 ----- .../__manifest__.py | 30 +------ .../js/web_ir_actions_act_window_message.js | 82 ++++++++----------- .../views/templates.xml | 23 +++--- 5 files changed, 54 insertions(+), 102 deletions(-) diff --git a/web_ir_actions_act_window_message/README.rst b/web_ir_actions_act_window_message/README.rst index cc368bed834b..e991265c9d72 100644 --- a/web_ir_actions_act_window_message/README.rst +++ b/web_ir_actions_act_window_message/README.rst @@ -70,6 +70,7 @@ Contributors ------------ * Holger Brunn +* Zakaria Makrelouf (ACSONE SA/NV) Maintainer ---------- diff --git a/web_ir_actions_act_window_message/__init__.py b/web_ir_actions_act_window_message/__init__.py index faef9dac007f..e69de29bb2d1 100644 --- a/web_ir_actions_act_window_message/__init__.py +++ b/web_ir_actions_act_window_message/__init__.py @@ -1,20 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# This module copyright (C) 2015 Therp BV . -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## diff --git a/web_ir_actions_act_window_message/__manifest__.py b/web_ir_actions_act_window_message/__manifest__.py index 7a553c520fe0..9a8bdcc1d2d5 100644 --- a/web_ir_actions_act_window_message/__manifest__.py +++ b/web_ir_actions_act_window_message/__manifest__.py @@ -1,27 +1,11 @@ # -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# This module copyright (C) 2015 Therp BV . -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## +# 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": "8.0.1.0.0", + "version": "9.0.1.0.0", "author": "Therp BV, " + "ACSONE SA/NV, " "Odoo Community Association (OCA)", "license": "AGPL-3", "category": "Hidden/Dependency", @@ -35,10 +19,4 @@ "qweb": [ 'static/src/xml/web_ir_actions_act_window_message.xml', ], - "auto_install": False, - 'installable': False, - "application": False, - "external_dependencies": { - 'python': [], - }, } diff --git a/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js b/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js index 227cd67109a8..006ac8df30db 100644 --- a/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js +++ b/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js @@ -1,59 +1,51 @@ -//-*- coding: utf-8 -*- -//############################################################################ -// -// OpenERP, Open Source Management Solution -// This module copyright (C) 2015 Therp BV . -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as -// published by the Free Software Foundation, either version 3 of the -// License, or (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . -// -//############################################################################ +/* Copyright 2017 Therp BV, ACSONE SA/NV + * * License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). */ + +odoo.define('web.web_ir_actions_act_window_message', function (require) { + "use strict"; + + var ActionManager = require('web.ActionManager'), + core = require('web.core'), + _ = require('_'), + Model = require('web.Model'), + Dialog = require('web.Dialog'); + + var _t = core._t; + + ActionManager.include({ + ir_actions_act_window_message: function(action, options){ -openerp.web_ir_actions_act_window_message = function(instance) -{ - instance.web.ActionManager.include({ - ir_actions_act_window_message: function(action, options) - { var self = this, buttons = []; if(action.close_button_title !== false) { buttons.push({ - text: action.close_button_title || - instance.web._t('Close'), - click: function() { dialog.close() }, + text: action.close_button_title || _t('Close'), + click: function() { + // refresh the view before closing the dialog + self.inner_widget.active_view + .controller.recursive_reload(); + dialog.close() + }, oe_link_class: 'oe_highlight', }) } - var dialog = new instance.web.Dialog( + var dialog = new Dialog( this, - { + _.extend({ size: 'medium', title: action.title, + $content: $('
', { + text: action.message, + }), buttons: buttons.concat( this.ir_actions_act_window_message_get_buttons( action, function() { dialog.close() }) ), - }, - jQuery(instance.web.qweb.render( - 'web_ir_actions_act_window_message', - { - 'this': this, - 'action': action, - })) - ) + }, options) + ); return dialog.open(); }, ir_actions_act_window_message_get_buttons: function(action, close_func) @@ -67,9 +59,8 @@ openerp.web_ir_actions_act_window_message = function(instance) oe_link_class: button_definition.oe_link_class || 'oe_highlight', click: function() { - if(button_definition.type == 'method') - { - (new instance.web.Model(button_definition.model)) + if(button_definition.type == 'method'){ + (new Model(button_definition.model)) .call( button_definition.method, button_definition.args, @@ -94,14 +85,13 @@ openerp.web_ir_actions_act_window_message = function(instance) } }); } - else - { + else{ self.do_action(button_definition); } close_func(); - }, + } } }); - }, + } }); -} +}); diff --git a/web_ir_actions_act_window_message/views/templates.xml b/web_ir_actions_act_window_message/views/templates.xml index 9ba42b0b2a76..44b1c287ea97 100644 --- a/web_ir_actions_act_window_message/views/templates.xml +++ b/web_ir_actions_act_window_message/views/templates.xml @@ -1,10 +1,13 @@ - - - - - - + + + + + + + + \ No newline at end of file From 80af24952a1ed3fdd52a9d6c73c8497f66fa3ae7 Mon Sep 17 00:00:00 2001 From: Zakaria Makrelouf Date: Sun, 7 May 2017 10:16:19 +0100 Subject: [PATCH 013/404] web_ir_actions_act_window_message: always refresh view after action --- .../src/js/web_ir_actions_act_window_message.js | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js b/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js index 006ac8df30db..6a71ace1df31 100644 --- a/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js +++ b/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js @@ -71,18 +71,10 @@ odoo.define('web.web_ir_actions_act_window_message', function (require) { { self.do_action(result); } - else - { - if( - self.inner_widget && - self.inner_widget.views - ) - { - self.inner_widget - .views[self.inner_widget.active_view] - .controller.recursive_reload(); - } - } + // always refresh the view after the action + // ex: action updates a status + self.inner_widget.active_view + .controller.recursive_reload(); }); } else{ From 11d43fa8557fe78e314b994fba0f36f6a6f9eb6c Mon Sep 17 00:00:00 2001 From: Zakaria Makrelouf Date: Tue, 16 May 2017 08:56:39 +0100 Subject: [PATCH 014/404] Reformat the code to have coherent coding style --- .../js/web_ir_actions_act_window_message.js | 45 +++++++++++-------- 1 file changed, 26 insertions(+), 19 deletions(-) diff --git a/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js b/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js index 6a71ace1df31..fbc620a091c9 100644 --- a/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js +++ b/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js @@ -1,7 +1,8 @@ /* Copyright 2017 Therp BV, ACSONE SA/NV * * License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). */ -odoo.define('web.web_ir_actions_act_window_message', function (require) { +odoo.define('web.web_ir_actions_act_window_message', function(require) +{ "use strict"; var ActionManager = require('web.ActionManager'), @@ -13,8 +14,8 @@ odoo.define('web.web_ir_actions_act_window_message', function (require) { var _t = core._t; ActionManager.include({ - ir_actions_act_window_message: function(action, options){ - + ir_actions_act_window_message: function(action, options) + { var self = this, buttons = []; @@ -34,18 +35,22 @@ odoo.define('web.web_ir_actions_act_window_message', function (require) { var dialog = new Dialog( this, - _.extend({ - size: 'medium', - title: action.title, - $content: $('
', { - text: action.message, - }), - buttons: buttons.concat( - this.ir_actions_act_window_message_get_buttons( - action, function() { dialog.close() }) - ), - }, options) - ); + _.extend( + { + size: 'medium', + title: action.title, + $content: $('
', + { + text: action.message, + } + ), + buttons: buttons.concat( + this.ir_actions_act_window_message_get_buttons( + action, function() { dialog.close() }) + ), + }, + options) + ) return dialog.open(); }, ir_actions_act_window_message_get_buttons: function(action, close_func) @@ -59,7 +64,8 @@ odoo.define('web.web_ir_actions_act_window_message', function (require) { oe_link_class: button_definition.oe_link_class || 'oe_highlight', click: function() { - if(button_definition.type == 'method'){ + if(button_definition.type == 'method') + { (new Model(button_definition.model)) .call( button_definition.method, @@ -77,13 +83,14 @@ odoo.define('web.web_ir_actions_act_window_message', function (require) { .controller.recursive_reload(); }); } - else{ + else + { self.do_action(button_definition); } close_func(); - } + }, } }); - } + }, }); }); From 4a6c12a155074129044512cda4b5177e212538ef Mon Sep 17 00:00:00 2001 From: Zakaria Makrelouf Date: Tue, 16 May 2017 09:00:16 +0100 Subject: [PATCH 015/404] s/oe_link_class/classes s/oe_highlight/btn-default and add it to readme * In v9.0 odoo uses classes for dialog buttons instead of oe_link_class --- web_ir_actions_act_window_message/README.rst | 2 ++ .../static/src/js/web_ir_actions_act_window_message.js | 5 ++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/web_ir_actions_act_window_message/README.rst b/web_ir_actions_act_window_message/README.rst index e991265c9d72..4a64a92ed4e6 100644 --- a/web_ir_actions_act_window_message/README.rst +++ b/web_ir_actions_act_window_message/README.rst @@ -41,6 +41,8 @@ Depend on this module and return 'args': [self.ids], # dictionary of keyword arguments 'kwargs': {'force': True}, + # button style + 'classes': 'btn-primary', } ] } diff --git a/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js b/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js index fbc620a091c9..d2a838e2fc1c 100644 --- a/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js +++ b/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js @@ -29,7 +29,7 @@ odoo.define('web.web_ir_actions_act_window_message', function(require) .controller.recursive_reload(); dialog.close() }, - oe_link_class: 'oe_highlight', + classes: 'btn-default', }) } @@ -61,8 +61,7 @@ odoo.define('web.web_ir_actions_act_window_message', function(require) { return { text: button_definition.name || 'No name set', - oe_link_class: button_definition.oe_link_class || - 'oe_highlight', + classes: button_definition.classes || 'btn-default', click: function() { if(button_definition.type == 'method') { From a92fcfbb520405d80354972d51cb5cf68ac4a6d1 Mon Sep 17 00:00:00 2001 From: Zakaria Makrelouf Date: Tue, 16 May 2017 09:37:43 +0100 Subject: [PATCH 016/404] wrap line breaks of the action message --- .../static/src/js/web_ir_actions_act_window_message.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js b/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js index d2a838e2fc1c..4ea153d4882e 100644 --- a/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js +++ b/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js @@ -42,6 +42,9 @@ odoo.define('web.web_ir_actions_act_window_message', function(require) $content: $('
', { text: action.message, + css: { + 'white-space': 'pre-line', + } } ), buttons: buttons.concat( From fa69007be02665bda849391e7d9056caa2e84f99 Mon Sep 17 00:00:00 2001 From: Benjamin Willig Date: Tue, 23 May 2017 17:25:01 +0200 Subject: [PATCH 017/404] [MIG] web_ir_actions_act_window_message: Migration to 10. Also added HTML handling --- web_ir_actions_act_window_message/README.rst | 5 +++- .../__manifest__.py | 2 +- .../js/web_ir_actions_act_window_message.js | 26 ++++++++++++------- 3 files changed, 22 insertions(+), 11 deletions(-) diff --git a/web_ir_actions_act_window_message/README.rst b/web_ir_actions_act_window_message/README.rst index 4a64a92ed4e6..3772ad3e7bb8 100644 --- a/web_ir_actions_act_window_message/README.rst +++ b/web_ir_actions_act_window_message/README.rst @@ -19,6 +19,8 @@ Depend on this module and return # 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) @@ -73,6 +75,7 @@ Contributors * Holger Brunn * Zakaria Makrelouf (ACSONE SA/NV) +* Benjamin Willig (ACSONE SA/NV) Maintainer ---------- @@ -85,4 +88,4 @@ This module is maintained by the OCA. 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. -To contribute to this module, please visit http://odoo-community.org. +To contribute to this module, please visit http://odoo-community.org. \ No newline at end of file diff --git a/web_ir_actions_act_window_message/__manifest__.py b/web_ir_actions_act_window_message/__manifest__.py index 9a8bdcc1d2d5..5dd3b18b13a2 100644 --- a/web_ir_actions_act_window_message/__manifest__.py +++ b/web_ir_actions_act_window_message/__manifest__.py @@ -3,7 +3,7 @@ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { "name": "Client side message boxes", - "version": "9.0.1.0.0", + "version": "10.0.1.0.0", "author": "Therp BV, " "ACSONE SA/NV, " "Odoo Community Association (OCA)", diff --git a/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js b/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js index 4ea153d4882e..1b0708d719be 100644 --- a/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js +++ b/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js @@ -7,7 +7,6 @@ odoo.define('web.web_ir_actions_act_window_message', function(require) var ActionManager = require('web.ActionManager'), core = require('web.core'), - _ = require('_'), Model = require('web.Model'), Dialog = require('web.Dialog'); @@ -33,20 +32,29 @@ odoo.define('web.web_ir_actions_act_window_message', function(require) }) } + 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: $('
', - { - text: action.message, - css: { - 'white-space': 'pre-line', - } - } - ), + $content: $('
', content_properties), buttons: buttons.concat( this.ir_actions_act_window_message_get_buttons( action, function() { dialog.close() }) From 6be7c4e48d1e1cc0b91ae1265ba446adc3972c1c Mon Sep 17 00:00:00 2001 From: OCA Transbot Date: Sat, 3 Jun 2017 12:41:51 +0200 Subject: [PATCH 018/404] OCA Transbot updated translations from Transifex --- web_ir_actions_act_window_message/i18n/ar.po | 13 +++++----- web_ir_actions_act_window_message/i18n/de.po | 14 +++++----- web_ir_actions_act_window_message/i18n/es.po | 14 +++++----- web_ir_actions_act_window_message/i18n/eu.po | 13 +++++----- web_ir_actions_act_window_message/i18n/fi.po | 13 +++++----- web_ir_actions_act_window_message/i18n/fr.po | 13 +++++----- web_ir_actions_act_window_message/i18n/hr.po | 13 +++++----- web_ir_actions_act_window_message/i18n/it.po | 13 +++++----- web_ir_actions_act_window_message/i18n/nl.po | 13 +++++----- .../i18n/nl_NL.po | 26 +++++++++++++++++++ web_ir_actions_act_window_message/i18n/pt.po | 26 +++++++++++++++++++ .../i18n/pt_BR.po | 13 +++++----- web_ir_actions_act_window_message/i18n/ro.po | 26 +++++++++++++++++++ web_ir_actions_act_window_message/i18n/sl.po | 13 +++++----- web_ir_actions_act_window_message/i18n/tr.po | 13 +++++----- 15 files changed, 162 insertions(+), 74 deletions(-) create mode 100644 web_ir_actions_act_window_message/i18n/nl_NL.po create mode 100644 web_ir_actions_act_window_message/i18n/pt.po create mode 100644 web_ir_actions_act_window_message/i18n/ro.po diff --git a/web_ir_actions_act_window_message/i18n/ar.po b/web_ir_actions_act_window_message/i18n/ar.po index c2bc8c41de96..0008b6b6d0db 100644 --- a/web_ir_actions_act_window_message/i18n/ar.po +++ b/web_ir_actions_act_window_message/i18n/ar.po @@ -3,14 +3,15 @@ # * web_ir_actions_act_window_message # # Translators: +# OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: web (8.0)\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-12-16 07:41+0000\n" -"PO-Revision-Date: 2015-11-07 11:20+0000\n" -"Last-Translator: <>\n" -"Language-Team: Arabic (http://www.transifex.com/oca/OCA-web-8-0/language/ar/)\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" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" @@ -19,7 +20,7 @@ msgstr "" #. 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:34 +#: code:addons/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js:24 #, 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 index 1a53b6648dc2..b1f6629a0bf1 100644 --- a/web_ir_actions_act_window_message/i18n/de.po +++ b/web_ir_actions_act_window_message/i18n/de.po @@ -3,15 +3,15 @@ # * web_ir_actions_act_window_message # # Translators: -# Rudolf Schnapka , 2016 +# OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: web (8.0)\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-01-10 07:31+0000\n" -"PO-Revision-Date: 2016-01-18 20:15+0000\n" -"Last-Translator: Rudolf Schnapka \n" -"Language-Team: German (http://www.transifex.com/oca/OCA-web-8-0/language/de/)\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" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" @@ -20,7 +20,7 @@ msgstr "" #. 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:34 +#: code:addons/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js:24 #, 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 index 3b8d60e185cf..3b6d628ff3ff 100644 --- a/web_ir_actions_act_window_message/i18n/es.po +++ b/web_ir_actions_act_window_message/i18n/es.po @@ -3,15 +3,15 @@ # * web_ir_actions_act_window_message # # Translators: -# Antonio Trueba, 2016 +# OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: web (8.0)\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-01-10 07:31+0000\n" -"PO-Revision-Date: 2016-02-10 16:40+0000\n" -"Last-Translator: Antonio Trueba\n" -"Language-Team: Spanish (http://www.transifex.com/oca/OCA-web-8-0/language/es/)\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" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" @@ -20,7 +20,7 @@ msgstr "" #. 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:34 +#: code:addons/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js:24 #, 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 index 5ff5a28f4b80..41fb36af5bfc 100644 --- a/web_ir_actions_act_window_message/i18n/eu.po +++ b/web_ir_actions_act_window_message/i18n/eu.po @@ -3,14 +3,15 @@ # * web_ir_actions_act_window_message # # Translators: +# OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: web (8.0)\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-02-18 09:01+0000\n" -"PO-Revision-Date: 2015-11-07 11:20+0000\n" -"Last-Translator: <>\n" -"Language-Team: Basque (http://www.transifex.com/oca/OCA-web-8-0/language/eu/)\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" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" @@ -19,7 +20,7 @@ msgstr "" #. 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:34 +#: code:addons/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js:24 #, 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 index 30cc25fc6856..5f8ffd6a3f6c 100644 --- a/web_ir_actions_act_window_message/i18n/fi.po +++ b/web_ir_actions_act_window_message/i18n/fi.po @@ -3,14 +3,15 @@ # * web_ir_actions_act_window_message # # Translators: +# OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: web (8.0)\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-01-10 07:31+0000\n" -"PO-Revision-Date: 2015-11-07 11:20+0000\n" -"Last-Translator: <>\n" -"Language-Team: Finnish (http://www.transifex.com/oca/OCA-web-8-0/language/fi/)\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" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" @@ -19,7 +20,7 @@ msgstr "" #. 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:34 +#: code:addons/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js:24 #, 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 index 92af8cf48c12..458aeb94b485 100644 --- a/web_ir_actions_act_window_message/i18n/fr.po +++ b/web_ir_actions_act_window_message/i18n/fr.po @@ -3,14 +3,15 @@ # * web_ir_actions_act_window_message # # Translators: +# OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: web (8.0)\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-11-23 13:46+0000\n" -"PO-Revision-Date: 2015-11-07 11:20+0000\n" -"Last-Translator: <>\n" -"Language-Team: French (http://www.transifex.com/oca/OCA-web-8-0/language/fr/)\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" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" @@ -19,7 +20,7 @@ msgstr "" #. 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:34 +#: code:addons/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js:24 #, 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 index 6fdf3b7eb407..5ac4e74c235b 100644 --- a/web_ir_actions_act_window_message/i18n/hr.po +++ b/web_ir_actions_act_window_message/i18n/hr.po @@ -3,14 +3,15 @@ # * web_ir_actions_act_window_message # # Translators: +# OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: web (8.0)\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-06-24 00:46+0000\n" -"PO-Revision-Date: 2015-11-07 11:20+0000\n" -"Last-Translator: <>\n" -"Language-Team: Croatian (http://www.transifex.com/oca/OCA-web-8-0/language/hr/)\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" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" @@ -19,7 +20,7 @@ msgstr "" #. 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:34 +#: code:addons/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js:24 #, 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 index 108201e809ba..7baa87e59567 100644 --- a/web_ir_actions_act_window_message/i18n/it.po +++ b/web_ir_actions_act_window_message/i18n/it.po @@ -3,14 +3,15 @@ # * web_ir_actions_act_window_message # # Translators: +# OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: web (8.0)\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-03-17 07:29+0000\n" -"PO-Revision-Date: 2015-11-07 11:20+0000\n" -"Last-Translator: <>\n" -"Language-Team: Italian (http://www.transifex.com/oca/OCA-web-8-0/language/it/)\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" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" @@ -19,7 +20,7 @@ msgstr "" #. 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:34 +#: code:addons/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js:24 #, 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 index 67049ccfe75d..a6a02243de06 100644 --- a/web_ir_actions_act_window_message/i18n/nl.po +++ b/web_ir_actions_act_window_message/i18n/nl.po @@ -3,14 +3,15 @@ # * web_ir_actions_act_window_message # # Translators: +# OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: web (8.0)\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-01-21 08:52+0000\n" -"PO-Revision-Date: 2015-11-07 11:20+0000\n" -"Last-Translator: <>\n" -"Language-Team: Dutch (http://www.transifex.com/oca/OCA-web-8-0/language/nl/)\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" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" @@ -19,7 +20,7 @@ msgstr "" #. 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:34 +#: code:addons/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js:24 #, 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..c6bd95c79b31 --- /dev/null +++ b/web_ir_actions_act_window_message/i18n/nl_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: +# 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" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: nl_NL\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:24 +#, 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..0bb7ba96570e --- /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" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: pt\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:24 +#, 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 index dd6d8167ea9f..6e9f2a684050 100644 --- a/web_ir_actions_act_window_message/i18n/pt_BR.po +++ b/web_ir_actions_act_window_message/i18n/pt_BR.po @@ -3,14 +3,15 @@ # * web_ir_actions_act_window_message # # Translators: +# OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: web (8.0)\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-03-11 02:17+0000\n" -"PO-Revision-Date: 2016-03-05 16:20+0000\n" -"Last-Translator: danimaribeiro \n" -"Language-Team: Portuguese (Brazil) (http://www.transifex.com/oca/OCA-web-8-0/language/pt_BR/)\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" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" @@ -19,7 +20,7 @@ msgstr "" #. 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:34 +#: code:addons/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js:24 #, 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..5f0f9ca7d1f2 --- /dev/null +++ b/web_ir_actions_act_window_message/i18n/ro.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: +# 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" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: ro\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:24 +#, 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 index 63ddbc003dd7..5725b8df4286 100644 --- a/web_ir_actions_act_window_message/i18n/sl.po +++ b/web_ir_actions_act_window_message/i18n/sl.po @@ -3,14 +3,15 @@ # * web_ir_actions_act_window_message # # Translators: +# OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: web (8.0)\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-11-23 13:46+0000\n" -"PO-Revision-Date: 2015-11-08 05:45+0000\n" -"Last-Translator: Matjaž Mozetič \n" -"Language-Team: Slovenian (http://www.transifex.com/oca/OCA-web-8-0/language/sl/)\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" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" @@ -19,7 +20,7 @@ msgstr "" #. 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:34 +#: code:addons/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js:24 #, 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 index 7d4493a4fe83..4f3a7178dd65 100644 --- a/web_ir_actions_act_window_message/i18n/tr.po +++ b/web_ir_actions_act_window_message/i18n/tr.po @@ -3,14 +3,15 @@ # * web_ir_actions_act_window_message # # Translators: +# OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: web (8.0)\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-01-08 21:34+0000\n" -"PO-Revision-Date: 2015-12-30 22:16+0000\n" -"Last-Translator: Ahmet Altınışık \n" -"Language-Team: Turkish (http://www.transifex.com/oca/OCA-web-8-0/language/tr/)\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" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" @@ -19,7 +20,7 @@ msgstr "" #. 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:34 +#: code:addons/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js:24 #, python-format msgid "Close" msgstr "Kapat" From e4f3b59422ba84de058641bba75afee62482f7f1 Mon Sep 17 00:00:00 2001 From: oca-travis Date: Sun, 24 Jun 2018 01:39:29 +0000 Subject: [PATCH 019/404] [UPD] Update web_ir_actions_act_window_message.pot --- web_ir_actions_act_window_message/i18n/ar.po | 7 +++--- web_ir_actions_act_window_message/i18n/de.po | 4 ++-- web_ir_actions_act_window_message/i18n/es.po | 4 ++-- web_ir_actions_act_window_message/i18n/eu.po | 4 ++-- web_ir_actions_act_window_message/i18n/fi.po | 4 ++-- web_ir_actions_act_window_message/i18n/fr.po | 4 ++-- web_ir_actions_act_window_message/i18n/hr.po | 7 +++--- web_ir_actions_act_window_message/i18n/it.po | 4 ++-- web_ir_actions_act_window_message/i18n/nl.po | 4 ++-- .../i18n/nl_NL.po | 7 +++--- web_ir_actions_act_window_message/i18n/pt.po | 4 ++-- .../i18n/pt_BR.po | 7 +++--- web_ir_actions_act_window_message/i18n/ro.po | 7 +++--- web_ir_actions_act_window_message/i18n/sl.po | 7 +++--- web_ir_actions_act_window_message/i18n/tr.po | 4 ++-- .../web_ir_actions_act_window_message.pot | 22 +++++++++++++++++++ 16 files changed, 64 insertions(+), 36 deletions(-) create mode 100644 web_ir_actions_act_window_message/i18n/web_ir_actions_act_window_message.pot diff --git a/web_ir_actions_act_window_message/i18n/ar.po b/web_ir_actions_act_window_message/i18n/ar.po index 0008b6b6d0db..6c0e056f7c6f 100644 --- a/web_ir_actions_act_window_message/i18n/ar.po +++ b/web_ir_actions_act_window_message/i18n/ar.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * web_ir_actions_act_window_message -# +# # Translators: # OCA Transbot , 2017 msgid "" @@ -12,11 +12,12 @@ msgstr "" "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" -"Language: ar\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" +"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 diff --git a/web_ir_actions_act_window_message/i18n/de.po b/web_ir_actions_act_window_message/i18n/de.po index b1f6629a0bf1..15a2786571fd 100644 --- a/web_ir_actions_act_window_message/i18n/de.po +++ b/web_ir_actions_act_window_message/i18n/de.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * web_ir_actions_act_window_message -# +# # Translators: # OCA Transbot , 2017 msgid "" @@ -12,10 +12,10 @@ msgstr "" "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" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: web_ir_actions_act_window_message diff --git a/web_ir_actions_act_window_message/i18n/es.po b/web_ir_actions_act_window_message/i18n/es.po index 3b6d628ff3ff..b5ea46f18873 100644 --- a/web_ir_actions_act_window_message/i18n/es.po +++ b/web_ir_actions_act_window_message/i18n/es.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * web_ir_actions_act_window_message -# +# # Translators: # OCA Transbot , 2017 msgid "" @@ -12,10 +12,10 @@ msgstr "" "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" -"Language: es\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: web_ir_actions_act_window_message diff --git a/web_ir_actions_act_window_message/i18n/eu.po b/web_ir_actions_act_window_message/i18n/eu.po index 41fb36af5bfc..182c1e76beb1 100644 --- a/web_ir_actions_act_window_message/i18n/eu.po +++ b/web_ir_actions_act_window_message/i18n/eu.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * web_ir_actions_act_window_message -# +# # Translators: # OCA Transbot , 2017 msgid "" @@ -12,10 +12,10 @@ msgstr "" "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" -"Language: eu\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: web_ir_actions_act_window_message diff --git a/web_ir_actions_act_window_message/i18n/fi.po b/web_ir_actions_act_window_message/i18n/fi.po index 5f8ffd6a3f6c..932ae1e7b607 100644 --- a/web_ir_actions_act_window_message/i18n/fi.po +++ b/web_ir_actions_act_window_message/i18n/fi.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * web_ir_actions_act_window_message -# +# # Translators: # OCA Transbot , 2017 msgid "" @@ -12,10 +12,10 @@ msgstr "" "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" -"Language: fi\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: web_ir_actions_act_window_message diff --git a/web_ir_actions_act_window_message/i18n/fr.po b/web_ir_actions_act_window_message/i18n/fr.po index 458aeb94b485..bcb10858cfaf 100644 --- a/web_ir_actions_act_window_message/i18n/fr.po +++ b/web_ir_actions_act_window_message/i18n/fr.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * web_ir_actions_act_window_message -# +# # Translators: # OCA Transbot , 2017 msgid "" @@ -12,10 +12,10 @@ msgstr "" "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" -"Language: fr\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #. module: web_ir_actions_act_window_message diff --git a/web_ir_actions_act_window_message/i18n/hr.po b/web_ir_actions_act_window_message/i18n/hr.po index 5ac4e74c235b..799efce488fc 100644 --- a/web_ir_actions_act_window_message/i18n/hr.po +++ b/web_ir_actions_act_window_message/i18n/hr.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * web_ir_actions_act_window_message -# +# # Translators: # OCA Transbot , 2017 msgid "" @@ -12,11 +12,12 @@ msgstr "" "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" -"Language: hr\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" +"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 diff --git a/web_ir_actions_act_window_message/i18n/it.po b/web_ir_actions_act_window_message/i18n/it.po index 7baa87e59567..b68dc6564b1c 100644 --- a/web_ir_actions_act_window_message/i18n/it.po +++ b/web_ir_actions_act_window_message/i18n/it.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * web_ir_actions_act_window_message -# +# # Translators: # OCA Transbot , 2017 msgid "" @@ -12,10 +12,10 @@ msgstr "" "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" -"Language: it\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: web_ir_actions_act_window_message diff --git a/web_ir_actions_act_window_message/i18n/nl.po b/web_ir_actions_act_window_message/i18n/nl.po index a6a02243de06..5f3a60ad1d73 100644 --- a/web_ir_actions_act_window_message/i18n/nl.po +++ b/web_ir_actions_act_window_message/i18n/nl.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * web_ir_actions_act_window_message -# +# # Translators: # OCA Transbot , 2017 msgid "" @@ -12,10 +12,10 @@ msgstr "" "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" -"Language: nl\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: web_ir_actions_act_window_message diff --git a/web_ir_actions_act_window_message/i18n/nl_NL.po b/web_ir_actions_act_window_message/i18n/nl_NL.po index c6bd95c79b31..cb772c2f7022 100644 --- a/web_ir_actions_act_window_message/i18n/nl_NL.po +++ b/web_ir_actions_act_window_message/i18n/nl_NL.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * web_ir_actions_act_window_message -# +# # Translators: # Peter Hageman , 2017 msgid "" @@ -11,11 +11,12 @@ msgstr "" "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-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" -"Language: nl_NL\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: web_ir_actions_act_window_message diff --git a/web_ir_actions_act_window_message/i18n/pt.po b/web_ir_actions_act_window_message/i18n/pt.po index 0bb7ba96570e..e25efb477117 100644 --- a/web_ir_actions_act_window_message/i18n/pt.po +++ b/web_ir_actions_act_window_message/i18n/pt.po @@ -1,7 +1,7 @@ # 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 "" @@ -12,10 +12,10 @@ msgstr "" "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" -"Language: pt\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: web_ir_actions_act_window_message diff --git a/web_ir_actions_act_window_message/i18n/pt_BR.po b/web_ir_actions_act_window_message/i18n/pt_BR.po index 6e9f2a684050..c9a7d2189b55 100644 --- a/web_ir_actions_act_window_message/i18n/pt_BR.po +++ b/web_ir_actions_act_window_message/i18n/pt_BR.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * web_ir_actions_act_window_message -# +# # Translators: # OCA Transbot , 2017 msgid "" @@ -11,11 +11,12 @@ msgstr "" "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-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" -"Language: pt_BR\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #. module: web_ir_actions_act_window_message diff --git a/web_ir_actions_act_window_message/i18n/ro.po b/web_ir_actions_act_window_message/i18n/ro.po index 5f0f9ca7d1f2..25cae0dd5bc0 100644 --- a/web_ir_actions_act_window_message/i18n/ro.po +++ b/web_ir_actions_act_window_message/i18n/ro.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * web_ir_actions_act_window_message -# +# # Translators: # Dorin Hongu , 2017 msgid "" @@ -12,11 +12,12 @@ msgstr "" "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" -"Language: ro\n" -"Plural-Forms: nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?2:1));\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 diff --git a/web_ir_actions_act_window_message/i18n/sl.po b/web_ir_actions_act_window_message/i18n/sl.po index 5725b8df4286..85dfd671aee3 100644 --- a/web_ir_actions_act_window_message/i18n/sl.po +++ b/web_ir_actions_act_window_message/i18n/sl.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * web_ir_actions_act_window_message -# +# # Translators: # OCA Transbot , 2017 msgid "" @@ -12,11 +12,12 @@ msgstr "" "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" -"Language: sl\n" -"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\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 diff --git a/web_ir_actions_act_window_message/i18n/tr.po b/web_ir_actions_act_window_message/i18n/tr.po index 4f3a7178dd65..bdd84af6b8a2 100644 --- a/web_ir_actions_act_window_message/i18n/tr.po +++ b/web_ir_actions_act_window_message/i18n/tr.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * web_ir_actions_act_window_message -# +# # Translators: # OCA Transbot , 2017 msgid "" @@ -12,10 +12,10 @@ msgstr "" "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" -"Language: tr\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #. module: web_ir_actions_act_window_message 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..f878e4512e56 --- /dev/null +++ b/web_ir_actions_act_window_message/i18n/web_ir_actions_act_window_message.pot @@ -0,0 +1,22 @@ +# 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 10.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 +#. openerp-web +#: code:addons/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js:24 +#, python-format +msgid "Close" +msgstr "" + From 647b229a2208ec16f810959ce9d4a3e882adad73 Mon Sep 17 00:00:00 2001 From: Abraham Anes Date: Thu, 21 Nov 2019 16:01:14 +0100 Subject: [PATCH 020/404] [12.0][MIG] web_ir_actions_act_window_message: Migration to 12.0 --- web_ir_actions_act_window_message/README.rst | 65 ++- .../__manifest__.py | 2 +- .../readme/CONTRIBUTORS.rst | 5 + .../readme/DESCRIPTION.rst | 1 + .../readme/ROADMAP.rst | 2 + .../readme/USAGE.rst | 44 ++ .../static/description/index.html | 456 ++++++++++++++++++ .../js/web_ir_actions_act_window_message.js | 35 +- 8 files changed, 584 insertions(+), 26 deletions(-) create mode 100644 web_ir_actions_act_window_message/readme/CONTRIBUTORS.rst create mode 100644 web_ir_actions_act_window_message/readme/DESCRIPTION.rst create mode 100644 web_ir_actions_act_window_message/readme/ROADMAP.rst create mode 100644 web_ir_actions_act_window_message/readme/USAGE.rst create mode 100644 web_ir_actions_act_window_message/static/description/index.html diff --git a/web_ir_actions_act_window_message/README.rst b/web_ir_actions_act_window_message/README.rst index 3772ad3e7bb8..73d5c905e0f1 100644 --- a/web_ir_actions_act_window_message/README.rst +++ b/web_ir_actions_act_window_message/README.rst @@ -1,8 +1,37 @@ +========================= Client side message boxes ========================= +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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/12.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-12-0/web-12-0-web_ir_actions_act_window_message + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/162/12.0 + :alt: Try me on Runbot + +|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 ===== @@ -57,35 +86,47 @@ 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 smashing it by providing a detailed and welcomed feedback -`here `_. +If you spotted it first, help us smashing 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) -Maintainer ----------- - -.. image:: http://odoo-community.org/logo.png - :alt: Odoo Community Association - :target: http://odoo-community.org +Maintainers +~~~~~~~~~~~ This module is maintained by the OCA. -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. +.. 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. -To contribute to this module, please visit http://odoo-community.org. \ No newline at end of file +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/__manifest__.py b/web_ir_actions_act_window_message/__manifest__.py index 5dd3b18b13a2..8b17eb02d3ba 100644 --- a/web_ir_actions_act_window_message/__manifest__.py +++ b/web_ir_actions_act_window_message/__manifest__.py @@ -3,7 +3,7 @@ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { "name": "Client side message boxes", - "version": "10.0.1.0.0", + "version": "12.0.1.0.0", "author": "Therp BV, " "ACSONE SA/NV, " "Odoo Community Association (OCA)", 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..7b22f2ca06b0 --- /dev/null +++ b/web_ir_actions_act_window_message/readme/CONTRIBUTORS.rst @@ -0,0 +1,5 @@ +* Holger Brunn +* Zakaria Makrelouf (ACSONE SA/NV) +* Benjamin Willig (ACSONE SA/NV) +* Ioan Galan (Studio73) +* Abraham Anes (Studio73) 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/static/description/index.html b/web_ir_actions_act_window_message/static/description/index.html new file mode 100644 index 000000000000..5eb47701fd92 --- /dev/null +++ b/web_ir_actions_act_window_message/static/description/index.html @@ -0,0 +1,456 @@ + + + + + + +Client side message boxes + + + +
+

Client side message boxes

+ + +

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

+

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 smashing 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.js b/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js index 1b0708d719be..1651a40d5d1c 100644 --- a/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js +++ b/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js @@ -7,13 +7,18 @@ odoo.define('web.web_ir_actions_act_window_message', function(require) var ActionManager = require('web.ActionManager'), core = require('web.core'), - Model = require('web.Model'), Dialog = require('web.Dialog'); var _t = core._t; ActionManager.include({ - ir_actions_act_window_message: function(action, options) + _handleAction: function (action, options) { + if (action.type === 'ir.actions.act_window.message') { + return this._executeWindowMessageAction(action, options); + } + return this._super.apply(this, arguments); + }, + _executeWindowMessageAction: function(action, options) { var self = this, buttons = []; @@ -24,8 +29,10 @@ odoo.define('web.web_ir_actions_act_window_message', function(require) text: action.close_button_title || _t('Close'), click: function() { // refresh the view before closing the dialog - self.inner_widget.active_view - .controller.recursive_reload(); + var controller = self.getCurrentController(); + if (controller && controller.widget) { + controller.widget.reload(); + } dialog.close() }, classes: 'btn-default', @@ -62,7 +69,7 @@ odoo.define('web.web_ir_actions_act_window_message', function(require) }, options) ) - return dialog.open(); + return dialog.open()._opened; }, ir_actions_act_window_message_get_buttons: function(action, close_func) { @@ -76,12 +83,12 @@ odoo.define('web.web_ir_actions_act_window_message', function(require) click: function() { if(button_definition.type == 'method') { - (new Model(button_definition.model)) - .call( - button_definition.method, - button_definition.args, - button_definition.kwargs - ).then(function(result) + self._rpc({ + model: button_definition.model, + method: button_definition.method, + args: button_definition.args, + kwargs: button_definition.kwargs + }).then(function(result) { if(_.isObject(result)) { @@ -89,8 +96,10 @@ odoo.define('web.web_ir_actions_act_window_message', function(require) } // always refresh the view after the action // ex: action updates a status - self.inner_widget.active_view - .controller.recursive_reload(); + var controller = self.getCurrentController(); + if (controller && controller.widget) { + controller.widget.reload(); + } }); } else From 3c8567810e1922c44ca7d4022fba5ae57338c2ae Mon Sep 17 00:00:00 2001 From: oca-travis Date: Tue, 26 Nov 2019 16:54:22 +0000 Subject: [PATCH 021/404] [UPD] Update web_ir_actions_act_window_message.pot --- .../i18n/web_ir_actions_act_window_message.pot | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 index f878e4512e56..4e9bada5a3e8 100644 --- 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 @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 10.0\n" +"Project-Id-Version: Odoo Server 12.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: <>\n" "Language-Team: \n" @@ -15,7 +15,7 @@ msgstr "" #. 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:24 +#: code:addons/web_ir_actions_act_window_message/static/src/js/web_ir_actions_act_window_message.js:29 #, python-format msgid "Close" msgstr "" From 0115e62863128cfdabac555f0fcef763b03f250e Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Tue, 26 Nov 2019 17:20:35 +0000 Subject: [PATCH 022/404] [UPD] README.rst --- .../static/description/index.html | 30 ++++++++++++++++--- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/web_ir_actions_act_window_message/static/description/index.html b/web_ir_actions_act_window_message/static/description/index.html index 5eb47701fd92..0555730768f3 100644 --- a/web_ir_actions_act_window_message/static/description/index.html +++ b/web_ir_actions_act_window_message/static/description/index.html @@ -3,13 +3,13 @@ - + Client side message boxes -
-

Client side message boxes

+
+ + +Odoo Community Association + +
+

Client side message boxes

-

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

+

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

@@ -387,7 +392,7 @@

Client side message boxes

-

Usage

+

Usage

Depend on this module and return

 {
@@ -432,14 +437,14 @@ 

Usage

You are responsible for translating the messages.

-

Known issues / Roadmap

+

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

+

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 @@ -447,16 +452,16 @@

Bug Tracker

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

-

Credits

+

Credits

-

Authors

+

Authors

  • Therp BV
  • ACSONE SA/NV
-

Contributors

+

Contributors

-

Maintainers

+

Maintainers

This module is maintained by the OCA.

Odoo Community Association @@ -485,5 +490,6 @@

Maintainers

+
From b17a793d18f9ff1beaacb7ca55577ed3903cd936 Mon Sep 17 00:00:00 2001 From: Stefan Rijnhart Date: Fri, 26 Jan 2018 12:35:53 +0100 Subject: [PATCH 049/404] [ADD] Ask for confirmation when copying records [UPD] Update web_copy_confirm.pot [ADD] icon.png --- web_copy_confirm/README.rst | 55 ++++++++++++++++++ web_copy_confirm/__init__.py | 0 web_copy_confirm/__openerp__.py | 19 ++++++ web_copy_confirm/i18n/web_copy_confirm.pot | 22 +++++++ web_copy_confirm/static/description/icon.png | Bin 0 -> 9455 bytes .../static/src/js/web_copy_confirm.js | 15 +++++ web_copy_confirm/views/assets.xml | 10 ++++ 7 files changed, 121 insertions(+) create mode 100644 web_copy_confirm/README.rst create mode 100644 web_copy_confirm/__init__.py create mode 100644 web_copy_confirm/__openerp__.py create mode 100644 web_copy_confirm/i18n/web_copy_confirm.pot create mode 100644 web_copy_confirm/static/description/icon.png create mode 100644 web_copy_confirm/static/src/js/web_copy_confirm.js create mode 100644 web_copy_confirm/views/assets.xml diff --git a/web_copy_confirm/README.rst b/web_copy_confirm/README.rst new file mode 100644 index 000000000000..f347116cd2fb --- /dev/null +++ b/web_copy_confirm/README.rst @@ -0,0 +1,55 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +================================================= +Show a confirmation dialogue when copying records +================================================= + +This module will show a confirmation dialog when the user selects the +`Duplicate` option from the `More` dropdown in the standard form view. + +Usage +===== + +.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas + :alt: Try me on Runbot + :target: https://runbot.odoo-community.org/runbot/162/8.0 + +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 smash it by providing detailed and welcomed feedback. + +Credits +======= + +Images +------ + +* Odoo Community Association: `Icon `_. + +Contributors +------------ + +* Stefan Rijnhart + +Do not contact contributors directly about support or help with technical issues. + +Maintainer +---------- + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +This module is maintained by the OCA. + +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. + +To contribute to this module, please visit https://odoo-community.org. diff --git a/web_copy_confirm/__init__.py b/web_copy_confirm/__init__.py new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/web_copy_confirm/__openerp__.py b/web_copy_confirm/__openerp__.py new file mode 100644 index 000000000000..2e345a1e2110 --- /dev/null +++ b/web_copy_confirm/__openerp__.py @@ -0,0 +1,19 @@ +# coding: utf-8 +# Copyright (C) 2018 DynApps +# @author Stefan Rijnhart +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +{ + "name": "Show confirmation dialogue before copying records", + "version": "8.0.1.0.0", + "author": "Dynapps,Odoo Community Association (OCA)", + "website": "https://github.com/OCA/web", + "license": "AGPL-3", + "category": "Tools", + "depends": [ + 'web', + ], + "data": [ + "views/assets.xml", + ], + "installable": True, +} diff --git a/web_copy_confirm/i18n/web_copy_confirm.pot b/web_copy_confirm/i18n/web_copy_confirm.pot new file mode 100644 index 000000000000..7ca065c18830 --- /dev/null +++ b/web_copy_confirm/i18n/web_copy_confirm.pot @@ -0,0 +1,22 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_copy_confirm +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.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_copy_confirm +#. openerp-web +#: code:addons/web_copy_confirm/static/src/js/web_copy_confirm.js:9 +#, python-format +msgid "Do you really want to copy this record?" +msgstr "" + diff --git a/web_copy_confirm/static/description/icon.png b/web_copy_confirm/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..3a0328b516c4980e8e44cdb63fd945757ddd132d GIT binary patch literal 9455 zcmW++2RxMjAAjx~&dlBk9S+%}OXg)AGE&Cb*&}d0jUxM@u(PQx^-s)697TX`ehR4?GS^qbkof1cslKgkU)h65qZ9Oc=ml_0temigYLJfnz{IDzUf>bGs4N!v3=Z3jMq&A#7%rM5eQ#dc?k~! zVpnB`o+K7|Al`Q_U;eD$B zfJtP*jH`siUq~{KE)`jP2|#TUEFGRryE2`i0**z#*^6~AI|YzIWy$Cu#CSLW3q=GA z6`?GZymC;dCP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gSzdp?6Uug9{ zd@V08Z$BdI?fpoCS$)t4mg4rT8Q_I}h`0d-vYZ^|dOB*Q^S|xqTV*vIg?@fVFSmMpaw0qtTRbx} z({Pg?#{2`sc9)M5N$*N|4;^t$+QP?#mov zGVC@I*lBVrOU-%2y!7%)fAKjpEFsgQc4{amtiHb95KQEwvf<(3T<9-Zm$xIew#P22 zc2Ix|App^>v6(3L_MCU0d3W##AB0M~3D00EWoKZqsJYT(#@w$Y_H7G22M~ApVFTRHMI_3be)Lkn#0F*V8Pq zc}`Cjy$bE;FJ6H7p=0y#R>`}-m4(0F>%@P|?7fx{=R^uFdISRnZ2W_xQhD{YuR3t< z{6yxu=4~JkeA;|(J6_nv#>Nvs&FuLA&PW^he@t(UwFFE8)|a!R{`E`K`i^ZnyE4$k z;(749Ix|oi$c3QbEJ3b~D_kQsPz~fIUKym($a_7dJ?o+40*OLl^{=&oq$<#Q(yyrp z{J-FAniyAw9tPbe&IhQ|a`DqFTVQGQ&Gq3!C2==4x{6EJwiPZ8zub-iXoUtkJiG{} zPaR&}_fn8_z~(=;5lD-aPWD3z8PZS@AaUiomF!G8I}Mf>e~0g#BelA-5#`cj;O5>N Xviia!U7SGha1wx#SCgwmn*{w2TRX*I literal 0 HcmV?d00001 diff --git a/web_copy_confirm/static/src/js/web_copy_confirm.js b/web_copy_confirm/static/src/js/web_copy_confirm.js new file mode 100644 index 000000000000..3d7859fda02e --- /dev/null +++ b/web_copy_confirm/static/src/js/web_copy_confirm.js @@ -0,0 +1,15 @@ +// Copyright (C) 2018 DynApps +// @author Stefan Rijnhart +// License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +openerp.web_copy_confirm = function(instance) { + instance.web.FormView.include({ + on_button_duplicate: function() { + var self = this; + this.has_been_loaded.done(function() { + if (confirm(_t("Do you really want to copy this record?"))) { + return self._super.apply(self, arguments); + } + }); + } + }); +}; diff --git a/web_copy_confirm/views/assets.xml b/web_copy_confirm/views/assets.xml new file mode 100644 index 000000000000..af0fab4a8a06 --- /dev/null +++ b/web_copy_confirm/views/assets.xml @@ -0,0 +1,10 @@ + + + + + + From 0b9137ef7c38b648d93f132ff8acba3faaa0c1a2 Mon Sep 17 00:00:00 2001 From: Robin Conjour Date: Mon, 4 Jan 2021 14:39:14 +0100 Subject: [PATCH 050/404] [IMP] web_copy_confirm: black, isort, prettier --- web_copy_confirm/__openerp__.py | 3 +-- web_copy_confirm/static/src/js/web_copy_confirm.js | 8 ++++---- web_copy_confirm/views/assets.xml | 13 ++++++++++--- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/web_copy_confirm/__openerp__.py b/web_copy_confirm/__openerp__.py index 2e345a1e2110..52e009b5ec9a 100644 --- a/web_copy_confirm/__openerp__.py +++ b/web_copy_confirm/__openerp__.py @@ -1,4 +1,3 @@ -# coding: utf-8 # Copyright (C) 2018 DynApps # @author Stefan Rijnhart # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). @@ -10,7 +9,7 @@ "license": "AGPL-3", "category": "Tools", "depends": [ - 'web', + "web", ], "data": [ "views/assets.xml", diff --git a/web_copy_confirm/static/src/js/web_copy_confirm.js b/web_copy_confirm/static/src/js/web_copy_confirm.js index 3d7859fda02e..0c58051c26eb 100644 --- a/web_copy_confirm/static/src/js/web_copy_confirm.js +++ b/web_copy_confirm/static/src/js/web_copy_confirm.js @@ -1,15 +1,15 @@ // Copyright (C) 2018 DynApps // @author Stefan Rijnhart // License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -openerp.web_copy_confirm = function(instance) { +openerp.web_copy_confirm = function (instance) { instance.web.FormView.include({ - on_button_duplicate: function() { + on_button_duplicate: function () { var self = this; - this.has_been_loaded.done(function() { + this.has_been_loaded.done(function () { if (confirm(_t("Do you really want to copy this record?"))) { return self._super.apply(self, arguments); } }); - } + }, }); }; diff --git a/web_copy_confirm/views/assets.xml b/web_copy_confirm/views/assets.xml index af0fab4a8a06..0588a6106371 100644 --- a/web_copy_confirm/views/assets.xml +++ b/web_copy_confirm/views/assets.xml @@ -1,9 +1,16 @@ - + -