Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
Hello every one here i am again, Does anyone knows how to display filename of a binary file? I tried to make it downloadable but upon the execution of the wizzard it shows only the "Download" without its filename and upon downloading it's filename become the name of my class plus there is no file extension. The downloaded file is something like this: custom_report_1 (i want to bear it's filename base on how i set it and it's extension). How can i resolve this? Pls help.
You have to create a char field and then link it with binary field in xml file using filename attribute.
# create a char field
file_data = fields.Binary('File')
file_name = fields.Char('File Name')
# Go to xml and
<field name="file_data" filename="file_name"/>
<field name="file_name" invisible="1"/>
About This Community
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 12/3/14, 10:54 PM|
|Seen: 1953 times|
|Last updated: 8/8/16, 1:55 AM|