Download file
Project description
This module lets you call a wizard to download any file.
Table of contents
Usage
To use this module, you need to:
Create a model that inherits from file.download.model.
Override the following functions:
`get_filename`: Return the desired file name.
`get_content`: Return the binary string file to download. For example:
from io import StringIO def get_content(self): output = StringIO() file.save(output) output.seek(0) return output.read()
After this, create a wizard with a button that calls the function set_file. This function will open a new wizard with the downloadable file.
Bug Tracker
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed feedback.
Do not contact contributors directly about support or help with technical issues.
Credits
Contributors
-
Valentín Vinagre
Ángel García de la Chica Herrera
Maintainers
This module is part of the sygel-technology/sy-server-backend project on GitHub.
You are welcome to contribute.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file odoo_addon_file_download-16.0.1.0.0.1-py3-none-any.whl.
File metadata
- Download URL: odoo_addon_file_download-16.0.1.0.0.1-py3-none-any.whl
- Upload date:
- Size: 41.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c3a0338f56e8a2450b2e25f3c9e54a1d0005844b1cb280ff22502259e08fc8c1
|
|
| MD5 |
c5ae825fb2ac9e8c82107f992974e410
|
|
| BLAKE2b-256 |
0fb0d9685c5890431065154de6d3b2c5893a734f15c0e92b5558ab34ddbe8903
|