Sorry, i have not enught karma for comments
This works only in FormViews:
have you tried to add the attribute "filename" in your XML-File:
_name = 'arts.bewerber'
binary = fields.Binary('Binray')
binary_fname = fields.Char('Binary Name')
<field name="binary" filename="binary_fname"/>
<field name="binary_fname" invisible="1"/>
Im actually loocking for an solution in TreeViews :-(
Yes I have indeed tried after your answer, but without success.. any other advice? The code:
_name = 'product.image'
name = fields.Char(string='Name')
image = fields.Binary(string='Image')
image_fname = fields.Char(string='File name')
product_tmpl_id = fields.Many2one('product.template', string='Product')
And the XML:
<field name="image" string="Image" filename="image_fname"/>
<field name="image_fname" invisible="1"/>
The filename is displayed on the binary field link, but when downloading the file it's a .bin file, not the original one.
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
|Asked: 1/5/15, 6:13 AM|
|Seen: 4087 times|
|Last updated: 8/23/16, 9:36 AM|