Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
4 Vastaukset
17723 Näkymät

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
Hylkää
Paras vastaus

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
Hylkää
Tekijä

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

Paras vastaus

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
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
1
huhtik. 18
8731
2
heinäk. 24
2530
1
kesäk. 24
5009
1
lokak. 23
10691
1
lokak. 23
98