From 422c64a40e4abecd4d493ff35fa8f78e39f8fb09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Mart=C3=ADnez?= Date: Wed, 18 Dec 2024 12:59:33 +0100 Subject: [PATCH] [IMP] attachment_zipped_download: pre-commit auto fixes --- attachment_zipped_download/README.rst | 164 +++++++++--------- attachment_zipped_download/pyproject.toml | 3 + .../readme/CONTRIBUTORS.md | 5 + .../readme/CONTRIBUTORS.rst | 8 - .../readme/DESCRIPTION.md | 4 + .../readme/DESCRIPTION.rst | 4 - .../readme/{USAGE.rst => USAGE.md} | 60 +++---- .../static/description/index.html | 44 +++-- 8 files changed, 152 insertions(+), 140 deletions(-) create mode 100644 attachment_zipped_download/pyproject.toml create mode 100644 attachment_zipped_download/readme/CONTRIBUTORS.md delete mode 100644 attachment_zipped_download/readme/CONTRIBUTORS.rst create mode 100644 attachment_zipped_download/readme/DESCRIPTION.md delete mode 100644 attachment_zipped_download/readme/DESCRIPTION.rst rename attachment_zipped_download/readme/{USAGE.rst => USAGE.md} (59%) diff --git a/attachment_zipped_download/README.rst b/attachment_zipped_download/README.rst index e737525f..e3528dde 100644 --- a/attachment_zipped_download/README.rst +++ b/attachment_zipped_download/README.rst @@ -17,21 +17,21 @@ 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/16.0/attachment_zipped_download + :target: https://github.com/OCA/knowledge/tree/17.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-16-0/knowledge-16-0-attachment_zipped_download + :target: https://translation.odoo-community.org/projects/knowledge-17-0/knowledge-17-0-attachment_zipped_download :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/knowledge&target_branch=16.0 + :target: https://runboat.odoo-community.org/builds?repo=OCA/knowledge&target_branch=17.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| This module allows downloading multiple attachments as a zip file. -This also provide a helper class `IrAttachmentActionDownloadMixin` -to be used by developer to add action method on models. +This also provide a helper class IrAttachmentActionDownloadMixin to be +used by developer to add action method on models. **Table of contents** @@ -41,84 +41,91 @@ to be used by developer to add action method on models. Usage ===== -#. Go to *Settings > Technical > Database Structure > Attachments* and select some files. -#. Go to *Actions > Download* and a zip file containing the selected files will be downloaded. +1. Go to *Settings > Technical > Database Structure > Attachments* and + select some files. +2. Go to *Actions > Download* and a zip file containing the selected + files will be downloaded. ## For developer -You can reuse the `IrAttachmentActionDownloadMixin` on your -favorite models:: +You can reuse the IrAttachmentActionDownloadMixin on your favorite +models: - from odoo import models +:: + + from odoo import models - class StockPicking(models.Model): - _name = "stock.picking" - _inherit = ["stock.picking", "ir.attachment.action_download"] + class StockPicking(models.Model): + _name = "stock.picking" + _inherit = ["stock.picking", "ir.attachment.action_download"] +Then you can add an action button on list view line or on the action +button (when multiple lines are selected) to download all files: -Then you can add an action button on list view line or on the action button -(when multiple lines are selected) to download all files:: +:: - - - - - stock.picking.tree download attachments - stock.picking - - -