diff --git a/attachment_zipped_download/README.rst b/attachment_zipped_download/README.rst index 7582c131..3423b91c 100644 --- a/attachment_zipped_download/README.rst +++ b/attachment_zipped_download/README.rst @@ -7,7 +7,7 @@ Attachment Zipped Download !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:f05914d14f12522617d342075832a7a6f58dcbd0f845cd6059d8ff3f0f231866 + !! source digest: sha256:5ba1f89bdbf346f050f066b394d1b1105be0fb9a54e77b147110037697890f6f !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png @@ -30,6 +30,9 @@ Attachment Zipped Download 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. + **Table of contents** .. contents:: @@ -41,6 +44,82 @@ 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. +## For developer + +You can reuse the `IrAttachmentActionDownloadMixin` on your +favorite models:: + + from odoo import models + + + 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:: + + + + + + stock.picking.tree download attachments + stock.picking + + +