Skip to main content

Download file

Project description

License: AGPL-3

File Download

This module lets you call a wizard to download any file.

Installation

To install this module, you need to:

  1. Install it as usual via Odoo Apps or your preferred method.

Configuration

No additional configuration is required for this module.

Usage

To use this module, you need to:

  1. Create a model that inherits from file.download.model.

  2. 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()
  3. 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 and errors are managed in issues of GitHub. In case of problems, please check if your issue has already been reported. If you are the first to discover it, help us by providing a detailed description here.

Please do not contact contributors directly about support or help with technical issues.

Credits

Authors

  • Sygel, Odoo Community Association (OCA)

Contributors

Maintainer

This module is maintained by Sygel.

Sygel

This module is part of the Sygel/sy-server-backend.

To contribute to this module, please visit https://github.com/sygel-technology.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

odoo_addon_file_download-15.0.1.0.0.2-py3-none-any.whl (33.1 kB view details)

Uploaded Python 3

File details

Details for the file odoo_addon_file_download-15.0.1.0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for odoo_addon_file_download-15.0.1.0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 42c859f2296fdb94051c75f96c19f3c6f37258c859647a4dae9c4f9771dd018f
MD5 acf01470dfefcd031b3148e05b2671a3
BLAKE2b-256 740a3fabe59566e1ab76724c7f9bdac775d2130ef69042c5d97796cf68420943

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page