I tried to import file to openerp 7 and I use the field binary
but it doesn't give me the name of the file, just the content binary.
How can I recover the file name?
I tried to import file to openerp 7 and I use the field binary
but it doesn't give me the name of the file, just the content binary.
How can I recover the file name?
Your Python model:
'source_file': fields.binary('Your binary file'),
'filename': fields.char('Filename'),
Your XML view:
<field name="filename" invisible="1"/>
<field name="source_file" filename="filename"/>
And this way you will have the file name stored in the variable filename
.
Hope it helps.