Created
May 24, 2019 04:24
-
-
Save bitodoo/ec58c6889d3079aec7444416bce3ba41 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from odoo.modules.module import get_module_resource | |
. | |
. | |
. | |
def pdf_file(self): | |
path_pdf = get_module_resource('module', 'files', 'file.pdf') | |
print(path_pdf) | |
# Out | |
# /home/user/addons/bo_btn_download_file/files/file.pdf | |
return open(path_pdf, 'rb').read() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment