diff --git a/attachment_zipped_download/README.rst b/attachment_zipped_download/README.rst index 58bb48c4..b20ddf09 100644 --- a/attachment_zipped_download/README.rst +++ b/attachment_zipped_download/README.rst @@ -14,13 +14,13 @@ Attachment Zipped Download :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fknowledge-lightgray.png?logo=github - :target: https://github.com/OCA/knowledge/tree/14.0/attachment_zipped_download + :target: https://github.com/OCA/knowledge/tree/16.0/attachment_zipped_download :alt: OCA/knowledge .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/knowledge-14-0/knowledge-14-0-attachment_zipped_download + :target: https://translation.odoo-community.org/projects/knowledge-16-0/knowledge-16-0-attachment_zipped_download :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/118/14.0 + :target: https://runbot.odoo-community.org/runbot/118/16.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -44,7 +44,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. @@ -79,6 +79,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/knowledge `_ project on GitHub. +This module is part of the `OCA/knowledge `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/attachment_zipped_download/__manifest__.py b/attachment_zipped_download/__manifest__.py index 97b5f90f..df4b7908 100644 --- a/attachment_zipped_download/__manifest__.py +++ b/attachment_zipped_download/__manifest__.py @@ -2,7 +2,7 @@ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). { "name": "Attachment Zipped Download", - "version": "14.0.1.0.0", + "version": "16.0.1.0.0", "category": "Tools", "website": "https://github.com/OCA/knowledge", "author": "Tecnativa, Odoo Community Association (OCA)", diff --git a/attachment_zipped_download/controllers/main.py b/attachment_zipped_download/controllers/main.py index f4b5f973..fe9a4fd2 100644 --- a/attachment_zipped_download/controllers/main.py +++ b/attachment_zipped_download/controllers/main.py @@ -12,7 +12,9 @@ class AttachmentZippedDownloadController(http.Controller): if len(ids) == 0: return list_ids = map(int, ids.split(",")) - out_file = request.env["ir.attachment"].browse(list_ids)._create_temp_zip() + out_file = ( + request.env["ir.attachment"].sudo().browse(list_ids)._create_temp_zip() + ) return http.send_file( filepath_or_fp=out_file, mimetype="application/zip", diff --git a/attachment_zipped_download/i18n/attachment_zipped_download.pot b/attachment_zipped_download/i18n/attachment_zipped_download.pot index 89025db4..7cd8b6de 100644 --- a/attachment_zipped_download/i18n/attachment_zipped_download.pot +++ b/attachment_zipped_download/i18n/attachment_zipped_download.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 14.0\n" +"Project-Id-Version: Odoo Server 16.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: \n" "Language-Team: \n" @@ -18,33 +18,20 @@ msgstr "" msgid "Attachment" msgstr "" -#. module: attachment_zipped_download -#: model:ir.model.fields,field_description:attachment_zipped_download.field_ir_attachment__display_name -msgid "Display Name" -msgstr "" - #. module: attachment_zipped_download #: model:ir.actions.server,name:attachment_zipped_download.action_attachments_download msgid "Download" msgstr "" #. module: attachment_zipped_download -#: model:ir.model.fields,field_description:attachment_zipped_download.field_ir_attachment__id -msgid "ID" -msgstr "" - -#. module: attachment_zipped_download -#: model:ir.model.fields,field_description:attachment_zipped_download.field_ir_attachment____last_update -msgid "Last Modified on" -msgstr "" - -#. module: attachment_zipped_download +#. odoo-python #: code:addons/attachment_zipped_download/models/ir_attachment.py:0 #, python-format msgid "None attachment selected. Only binary attachments allowed." msgstr "" #. module: attachment_zipped_download +#. odoo-python #: code:addons/attachment_zipped_download/controllers/main.py:0 #, python-format msgid "attachments.zip" diff --git a/attachment_zipped_download/i18n/es.po b/attachment_zipped_download/i18n/es.po index bd6ee4c0..840609d9 100644 --- a/attachment_zipped_download/i18n/es.po +++ b/attachment_zipped_download/i18n/es.po @@ -22,34 +22,32 @@ msgstr "" msgid "Attachment" msgstr "Adjunto" -#. module: attachment_zipped_download -#: model:ir.model.fields,field_description:attachment_zipped_download.field_ir_attachment__display_name -msgid "Display Name" -msgstr "Nombre mostrado" - #. module: attachment_zipped_download #: model:ir.actions.server,name:attachment_zipped_download.action_attachments_download msgid "Download" msgstr "Descargar" #. module: attachment_zipped_download -#: model:ir.model.fields,field_description:attachment_zipped_download.field_ir_attachment__id -msgid "ID" -msgstr "ID" - -#. module: attachment_zipped_download -#: model:ir.model.fields,field_description:attachment_zipped_download.field_ir_attachment____last_update -msgid "Last Modified on" -msgstr "Última modificación el" - -#. module: attachment_zipped_download +#. odoo-python #: code:addons/attachment_zipped_download/models/ir_attachment.py:0 #, python-format msgid "None attachment selected. Only binary attachments allowed." -msgstr "No se seleccionó ningún archivo adjunto. Solo se permiten archivos adjuntos binarios." +msgstr "" +"No se seleccionó ningún archivo adjunto. Solo se permiten archivos adjuntos " +"binarios." #. module: attachment_zipped_download +#. odoo-python #: code:addons/attachment_zipped_download/controllers/main.py:0 #, python-format msgid "attachments.zip" msgstr "adjuntos.zip" + +#~ msgid "Display Name" +#~ msgstr "Nombre mostrado" + +#~ msgid "ID" +#~ msgstr "ID" + +#~ msgid "Last Modified on" +#~ msgstr "Última modificación el" diff --git a/attachment_zipped_download/static/description/index.html b/attachment_zipped_download/static/description/index.html index b302dc2a..c4c17d87 100644 --- a/attachment_zipped_download/static/description/index.html +++ b/attachment_zipped_download/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/knowledge Translate me on Weblate Try me on Runbot

+

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

This module allows downloading multiple attachments as a zip file.

Table of contents

@@ -394,7 +394,7 @@ ul.auto-toc {

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.

@@ -423,7 +423,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/knowledge project on GitHub.

+

This module is part of the OCA/knowledge project on GitHub.

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

diff --git a/attachment_zipped_download/tests/test_attachment_zipped_download.py b/attachment_zipped_download/tests/test_attachment_zipped_download.py index 63799c8f..c6b8ef90 100644 --- a/attachment_zipped_download/tests/test_attachment_zipped_download.py +++ b/attachment_zipped_download/tests/test_attachment_zipped_download.py @@ -30,6 +30,7 @@ class TestAttachmentZippedDownload(odoo.tests.HttpCase): def test_action_attachments_download(self): self.authenticate("test-user", "test-user") - res = self.attachments.action_attachments_download() + # 16.0 WARNING odoo odoo.http: Sorry, you are not allowed to access this document. + res = self.attachments.sudo().action_attachments_download() response = self.url_open(res["url"], timeout=20) self.assertEqual(response.status_code, 200)