Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
4 Odpowiedzi
17704 Widoki

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?

Awatar
Odrzuć
Najlepsza odpowiedź

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.

Awatar
Odrzuć
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

Najlepsza odpowiedź

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

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
kwi 18
8725
2
lip 24
2519
1
cze 24
5000
1
paź 23
10686
1
paź 23
98