mirror of
https://github.com/OCA/knowledge.git
synced 2025-12-20 20:32:19 -06:00
[16.0][MIG] attachment_zipped_download: Migration to 16.0
[UPD] Update attachment_zipped_download.pot [UPD] README.rst Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: knowledge-16.0/knowledge-16.0-attachment_zipped_download Translate-URL: https://translation.odoo-community.org/projects/knowledge-16-0/knowledge-16-0-attachment_zipped_download/
This commit is contained in:
committed by
Víctor Martínez
parent
8885cfecf1
commit
f957b2e1b0
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user