diff --git a/web_disable_export_group/README.rst b/web_disable_export_group/README.rst index dbafd0dab..bbd1fe6ae 100644 --- a/web_disable_export_group/README.rst +++ b/web_disable_export_group/README.rst @@ -14,13 +14,13 @@ Web Disable Export Group :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_disable_export_group + :target: https://github.com/OCA/web/tree/13.0/web_disable_export_group :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_disable_export_group + :target: https://translation.odoo-community.org/projects/web-13-0/web-13-0-web_disable_export_group :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 + :target: https://runbot.odoo-community.org/runbot/162/13.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -55,7 +55,7 @@ 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 `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -78,7 +78,8 @@ Contributors * `Tecnativa `_: - * David Vidal + * David Vidal + * João Marques Maintainers ~~~~~~~~~~~ @@ -93,6 +94,6 @@ 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. +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_disable_export_group/__manifest__.py b/web_disable_export_group/__manifest__.py index 9e1ac41dc..ae2a39767 100644 --- a/web_disable_export_group/__manifest__.py +++ b/web_disable_export_group/__manifest__.py @@ -1,14 +1,19 @@ # Copyright 2016 Onestein () # Copyright 2018 Tecnativa - David Vidal +# Copyright 2018 Tecnativa - João Marques # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { "name": "Web Disable Export Group", - "version": "12.0.1.0.0", + "version": "13.0.1.0.0", "license": "AGPL-3", "author": "Onestein, " "Tecnativa, " "Odoo Community Association (OCA)", "website": "https://github.com/OCA/web", "category": "Web", - "depends": ["web",], - "data": ["security/groups.xml", "templates/assets.xml",], + "depends": ["web"], + "data": [ + "security/groups.xml", + "templates/assets.xml", + "templates/tour_assets.xml", + ], "installable": True, } diff --git a/web_disable_export_group/i18n/es.po b/web_disable_export_group/i18n/es.po index da5b3b67c..a6de3e09e 100644 --- a/web_disable_export_group/i18n/es.po +++ b/web_disable_export_group/i18n/es.po @@ -1,6 +1,6 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * web_disable_export_group +# * web_disable_export_group # msgid "" msgstr "" @@ -18,7 +18,8 @@ msgstr "" #. module: web_disable_export_group #. openerp-web -#: code:addons/web_disable_export_group/static/src/js/disable_export_group.js:16 +#: code:addons/web_disable_export_group/static/src/js/disable_export_group.js:0 +#: code:addons/web_disable_export_group/static/src/js/web_disable_export_group_tour.js:0 #, python-format msgid "Export" msgstr "Exportar" diff --git a/web_disable_export_group/i18n/hr.po b/web_disable_export_group/i18n/hr.po index a63ab1286..26041bf6d 100644 --- a/web_disable_export_group/i18n/hr.po +++ b/web_disable_export_group/i18n/hr.po @@ -1,6 +1,6 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * web_disable_export_group +# * web_disable_export_group # msgid "" msgstr "" @@ -13,13 +13,14 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=" -"4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"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" "X-Generator: Weblate 3.9.1\n" #. module: web_disable_export_group #. openerp-web -#: code:addons/web_disable_export_group/static/src/js/disable_export_group.js:16 +#: code:addons/web_disable_export_group/static/src/js/disable_export_group.js:0 +#: code:addons/web_disable_export_group/static/src/js/web_disable_export_group_tour.js:0 #, python-format msgid "Export" msgstr "Izvoz" diff --git a/web_disable_export_group/i18n/pt.po b/web_disable_export_group/i18n/pt.po index b14700c66..e379d0bd9 100644 --- a/web_disable_export_group/i18n/pt.po +++ b/web_disable_export_group/i18n/pt.po @@ -1,6 +1,6 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * web_disable_export_group +# * web_disable_export_group # msgid "" msgstr "" @@ -18,7 +18,8 @@ msgstr "" #. module: web_disable_export_group #. openerp-web -#: code:addons/web_disable_export_group/static/src/js/disable_export_group.js:16 +#: code:addons/web_disable_export_group/static/src/js/disable_export_group.js:0 +#: code:addons/web_disable_export_group/static/src/js/web_disable_export_group_tour.js:0 #, python-format msgid "Export" msgstr "Exportar" diff --git a/web_disable_export_group/i18n/web_disable_export_group.pot b/web_disable_export_group/i18n/web_disable_export_group.pot index 8fb6a85ed..80395d288 100644 --- a/web_disable_export_group/i18n/web_disable_export_group.pot +++ b/web_disable_export_group/i18n/web_disable_export_group.pot @@ -1,12 +1,12 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * web_disable_export_group +# * web_disable_export_group # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 12.0\n" +"Project-Id-Version: Odoo Server 13.0\n" "Report-Msgid-Bugs-To: \n" -"Last-Translator: <>\n" +"Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -15,7 +15,9 @@ msgstr "" #. module: web_disable_export_group #. openerp-web -#: code:addons/web_disable_export_group/static/src/js/disable_export_group.js:16 +#: code:addons/web_disable_export_group/static/src/js/disable_export_group.js:0 +#: code:addons/web_disable_export_group/static/src/js/web_disable_export_group_tour.js:0 +#: code:addons/web_disable_export_group/static/src/js/web_disable_export_group_tour.js:0 #, python-format msgid "Export" msgstr "" @@ -29,4 +31,3 @@ msgstr "" #: model:ir.model,name:web_disable_export_group.model_ir_http msgid "HTTP Routing" msgstr "" - diff --git a/web_disable_export_group/i18n/zh_CN.po b/web_disable_export_group/i18n/zh_CN.po index 8acfa0d77..203977350 100644 --- a/web_disable_export_group/i18n/zh_CN.po +++ b/web_disable_export_group/i18n/zh_CN.po @@ -1,6 +1,6 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * web_disable_export_group +# * web_disable_export_group # msgid "" msgstr "" @@ -18,7 +18,8 @@ msgstr "" #. module: web_disable_export_group #. openerp-web -#: code:addons/web_disable_export_group/static/src/js/disable_export_group.js:16 +#: code:addons/web_disable_export_group/static/src/js/disable_export_group.js:0 +#: code:addons/web_disable_export_group/static/src/js/web_disable_export_group_tour.js:0 #, python-format msgid "Export" msgstr "导出" diff --git a/web_disable_export_group/models/ir_http.py b/web_disable_export_group/models/ir_http.py index 5db53b9bc..156f13160 100644 --- a/web_disable_export_group/models/ir_http.py +++ b/web_disable_export_group/models/ir_http.py @@ -9,7 +9,7 @@ class Http(models.AbstractModel): _inherit = "ir.http" def session_info(self): - res = super(Http, self).session_info() + res = super().session_info() user = request.env.user res.update( { diff --git a/web_disable_export_group/readme/CONTRIBUTORS.rst b/web_disable_export_group/readme/CONTRIBUTORS.rst index 69dbb6009..043f98583 100644 --- a/web_disable_export_group/readme/CONTRIBUTORS.rst +++ b/web_disable_export_group/readme/CONTRIBUTORS.rst @@ -5,4 +5,5 @@ * `Tecnativa `_: - * David Vidal + * David Vidal + * João Marques diff --git a/web_disable_export_group/static/description/index.html b/web_disable_export_group/static/description/index.html index cca285d6e..c9b146cb4 100644 --- a/web_disable_export_group/static/description/index.html +++ b/web_disable_export_group/static/description/index.html @@ -367,7 +367,7 @@ ul.auto-toc { !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

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

+

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

In the standard Odoo the UI option ‘Export’ that is present in the ‘Action’ menu of any list view is always enabled (for every user).

This module makes the option ‘Export’ enabled only for the users that belong @@ -401,7 +401,7 @@ make use of the option ‘Export’.

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.

+feedback.

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

@@ -422,7 +422,8 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
  • Tecnativa:
  • @@ -434,7 +435,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome

    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.

    +

    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_disable_export_group/static/src/js/web_disable_export_group_tour.js b/web_disable_export_group/static/src/js/web_disable_export_group_tour.js new file mode 100644 index 000000000..00c1c4e8e --- /dev/null +++ b/web_disable_export_group/static/src/js/web_disable_export_group_tour.js @@ -0,0 +1,63 @@ +/* Copyright 2020 Tecnativa - João Marques + License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). */ + +odoo.define("web_disable_export_group.tour", function(require) { + "use strict"; + + var core = require("web.core"); + var tour = require("web_tour.tour"); + + var _t = core._t; + + tour.register( + "export_tour_admin", + { + test: true, + url: + "/web#model=ir.ui.view&view_type=list&cids=&action=base.action_ui_view", + }, + [ + { + content: "Select all records", + trigger: ".custom-control-input:first", + }, + { + content: "Open actions", + trigger: ".o_dropdown_toggler_btn", + }, + { + content: "Check if Export button exists", + trigger: + '.o_control_panel div.o_dropdown_menu a:contains("' + + _t("Export") + + '")', + }, + ] + ); + tour.register( + "export_tour_demo", + { + test: true, + url: + "/web#model=ir.ui.view&view_type=list&cids=&action=base.action_ui_view", + }, + [ + { + content: "Select all records", + trigger: ".custom-control-input:first", + }, + { + content: "Open actions", + trigger: ".o_dropdown_toggler_btn", + }, + { + content: "Check if Export button does not exist", + trigger: + '.o_control_panel div.o_dropdown_menu a:first:not(:contains("' + + _t("Export") + + '"))', + }, + ] + ); + return {}; +}); diff --git a/web_disable_export_group/templates/tour_assets.xml b/web_disable_export_group/templates/tour_assets.xml new file mode 100644 index 000000000..5f0513ef8 --- /dev/null +++ b/web_disable_export_group/templates/tour_assets.xml @@ -0,0 +1,17 @@ + + + +