Odoo Help

Welcome!

This community 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.

0

Read content of Binary fields

By
Omar OUHARI
on 10/8/15, 5:33 AM 1,384 views

Hi,

How can I read content of binary field in Odoo8.

I added a fileds.Binary in my model and can browse file in view but I can't read It content.  

Please to give an exemple about how to browse a file and read It content in Odoo8 ?

 

could you please give more details, did you meant about reading values from text file?

Baiju
on 10/21/15, 1:38 PM
1
Virali
On 10/8/15, 9:28 AM

hii Omar OUHARI ,

below code help to read content of file after browse. and file is my fields.binary field. hope so this will help you.

base64.encodestring(args.get('file').read())

please can you help me i use a txt field and store it as binary but when i upload it i find this: ÓMuÓM4

Drees Far
on 10/8/15, 9:32 AM

@Drees could you please give more details, did you meant about reading values from text file?

Baiju
on 10/21/15, 1:37 PM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 10/8/15, 5:33 AM
Seen: 1384 times
Last updated: 10/21/15, 1:38 PM