Merge PR #430 into 16.0

Signed-off-by pedrobaeza
This commit is contained in:
OCA-git-bot 2024-02-22 21:53:28 +00:00
commit e7aef87808

View File

@ -13,9 +13,11 @@ class AttachmentZippedDownloadController(http.Controller):
return
list_ids = map(int, ids.split(","))
out_file = request.env["ir.attachment"].browse(list_ids)._create_temp_zip()
return http.send_file(
filepath_or_fp=out_file,
stream = http.Stream(
type="data",
data=out_file.getvalue(),
mimetype="application/zip",
as_attachment=True,
filename=_("attachments.zip"),
download_name=_("attachments.zip"),
)
return stream.get_response()