[16.0][MIG] attachment_zipped_download: Migration to 16.0

[UPD] Update attachment_zipped_download.pot

[UPD] README.rst

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: knowledge-16.0/knowledge-16.0-attachment_zipped_download
Translate-URL: https://translation.odoo-community.org/projects/knowledge-16-0/knowledge-16-0-attachment_zipped_download/
This commit is contained in:
FernandoRomera 2022-12-16 11:26:14 +01:00 committed by Víctor Martínez
parent 8885cfecf1
commit f957b2e1b0
7 changed files with 31 additions and 43 deletions

View File

@ -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 <https://github.com/OCA/knowledge/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 <https://github.com/OCA/knowledge/issues/new?body=module:%20attachment_zipped_download%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/knowledge/issues/new?body=module:%20attachment_zipped_download%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
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 <https://github.com/OCA/knowledge/tree/14.0/attachment_zipped_download>`_ project on GitHub.
This module is part of the `OCA/knowledge <https://github.com/OCA/knowledge/tree/16.0/attachment_zipped_download>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

View File

@ -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)",

View File

@ -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",

View File

@ -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"

View File

@ -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"

View File

@ -367,7 +367,7 @@ ul.auto-toc {
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/knowledge/tree/14.0/attachment_zipped_download"><img alt="OCA/knowledge" src="https://img.shields.io/badge/github-OCA%2Fknowledge-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/knowledge-14-0/knowledge-14-0-attachment_zipped_download"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/118/14.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/knowledge/tree/16.0/attachment_zipped_download"><img alt="OCA/knowledge" src="https://img.shields.io/badge/github-OCA%2Fknowledge-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/knowledge-16-0/knowledge-16-0-attachment_zipped_download"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/118/16.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p>This module allows downloading multiple attachments as a zip file.</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
@ -394,7 +394,7 @@ ul.auto-toc {
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/knowledge/issues">GitHub Issues</a>.
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
<a class="reference external" href="https://github.com/OCA/knowledge/issues/new?body=module:%20attachment_zipped_download%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<a class="reference external" href="https://github.com/OCA/knowledge/issues/new?body=module:%20attachment_zipped_download%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
@ -423,7 +423,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
<p>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.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/knowledge/tree/14.0/attachment_zipped_download">OCA/knowledge</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/knowledge/tree/16.0/attachment_zipped_download">OCA/knowledge</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div>
</div>

View File

@ -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)