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

How to download files which are attached in default attachments with original file extensions?

By
vadivel
on 11/9/16, 4:45 AM 102 views

Hi,

I need a solution for attachments.When i attach a file(.pdf or .jpeg or .png or .doc or .xls) in attachments on top of any form, once i download that file means, it is downloaded with some other unrelated name and without file extension.Can anyone have solutions to resolve this bug.Thanks in advance.

2
Ameera PP
On 11/9/16, 5:23 AM

class myclass(osv.Model):

_name = "myclassname"

_columns = {

'binary_field':fields.binary('File'),

'file_name':fields.char('Filename'),

}

And in the form view in your xml:

<field name="filename" invisible="1"/>

<field name="binary_field" filename="file_name"/>

 

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: 11/9/16, 4:45 AM
Seen: 102 times
Last updated: 11/9/16, 6:55 AM