diff --git a/attachment_zipped_download/README.rst b/attachment_zipped_download/README.rst index 58bb48c4..2d1253c3 100644 --- a/attachment_zipped_download/README.rst +++ b/attachment_zipped_download/README.rst @@ -27,6 +27,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:: @@ -38,6 +41,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 + + +