Client Action File Download
“Triggers File Download from Server Action”
This module allows developers to trigger file download from server action.
Description
This module allows developers to trigger file download from server action.
Views
- INHERIT assets_backend (qweb)
Dependencies
- Web
Demonstration
◉ Sample Code ◉
Attachment record
action = { 'type' : 'ir.actions.client', 'tag' : 'file_download', 'params' : { 'id': attachment.id, 'download' : True } }
Other binary field
action = { 'type': 'ir.actions.client', 'tag' : 'file_download', 'params' : { 'model' : self._name, 'field' : 'datas', 'id' : self.id, 'filename' : self.filename, 'filename_field' : 'filename', 'download' : True } }