Odoo Help


How to display file name of a binary file? [Solved]

Anirudh Lou
on 12/3/14, 10:54 PM 1,391 views

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.

Sudhir Arya (SA)
On 8/7/16, 12:15 PM

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"/>
David Baramidze
On 8/5/16, 1:28 PM

How you solved this problem?

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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

2 follower(s)


Asked: 12/3/14, 10:54 PM
Seen: 1391 times
Last updated: 8/8/16, 1:55 AM