I generated a txt file when clicking a button using python code and it is automatically saved to /opt
Is there a way that I can generate a txt file when clicking a button or get the saved txt file from the /opt and download it using browsers.
Any suggestions of tutorials or documentation about it?
Hi, Have you tried urllib package. I think it covers fetching file from system and to download it.
this link may help : http://docs.python.org/library/urllib.html
Hi @Mohammed Amal Thank you.
Do you have sample code that does this?
Yes you can do that, reference link: http://learnopenerp.blogspot.com/2020/06/write-binary-data-nto-zip-file-and-downlaod-it-on-button-click-in-odoo.html