Skip to content

Commit

Permalink
[FIX] Solve python build error
Browse files Browse the repository at this point in the history
  • Loading branch information
manuel-florido committed Dec 18, 2024
1 parent c0e5ae0 commit ac5fd5d
Showing 1 changed file with 29 additions and 28 deletions.
57 changes: 29 additions & 28 deletions file_download/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,76 +6,77 @@
File Download
=============

Let's you call a wizard to download any file.

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

Installation
============

To install this module, you need to:

#. Only install

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

Configuration
=============

To configure this module, you need to:

#. Nothing

No additional configuration is required for this module.

Usage
=====

To use this module, you need to:

Create a model that inherits from file.download.model.
Override the following functions:
"get_filename" to make it return the desired file name.
"get_content" to return the binary string file to download. For example:
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.
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:

.. code-block:: python
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 <https://github.com/sygel-technology/sy-server-backend/issues>`_.
In case of problems, please check if your problem has already been
reported. If you are the first to discover it, help us solving it by indicating
a detailed description `here <https://github.com/sygel-technology/sy-server-backend/issues/new>`_.

Do not contact contributors directly about support or help with technical issues.
Bugs and errors are managed in `issues of GitHub <https://github.com/sygel-technology/sy-server-backend/issues>`_.
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 <https://github.com/sygel-technology/sy-server-backend/issues/new>`_.

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

Credits
=======

Authors
~~~~~~~
-------

* Sygel, Odoo Community Association (OCA)

Contributors
~~~~~~~~~~~~
------------

* Valentin Vinagre <valentin.vinagre@sygel.es>
* Ángel García de la Chica Herrera <angel.garcia@sygel.es>

Maintainer
~~~~~~~~~~
----------

This module is maintained by Sygel.

.. image:: https://www.sygel.es/logo.png
:alt: Sygel
:target: https://www.sygel.es

This module is part of the `Sygel/sy-server-backend <https://github.com/sygel-technology/sy-server-backend>`_.
This module is part of the `Sygel/sy-server-backend <https://github.com/sygel-technology/sy-server-backend>`_.

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

0 comments on commit ac5fd5d

Please sign in to comment.