Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
4 Odpovědi
17730 Zobrazení

I need to store audio file from web url in binary field. now it's stored as unknown format. but, i need it's original file format like .mp3. can anyone show me the way?

Avatar
Zrušit
Nejlepší odpověď

Pls. check this module: https://www.odoo.com/apps/modules/11.0/audio_field/
hope it will help you.
or you can add name of that file like abc.mp3 in file_name field.

Avatar
Zrušit
Autor

Hi, can you provide a way in python if possible, because i'm not familiar with javascript. Thank you

when you are creating file from the code of python just add name in name field test.mp3

Nejlepší odpověď

In .py file

attachment = fields.Binary(string="Attachment")    
store_fname = fields.Char(string="File Name")

In .xml file                               

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

Hope this helps you

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
1
dub 18
8736
2
čvc 24
2540
1
čvn 24
5012
1
říj 23
10694
1
říj 23
98