[16.0][MIG] attachment_zipped_download: Migration to 16.0

This commit is contained in:
FernandoRomera
2022-12-16 11:26:14 +01:00
parent e25308fd9a
commit 1a38db3e18
5 changed files with 13 additions and 3 deletions

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