Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
667 Visualizzazioni

I am making some modifications for a migration from Odoo 14 to 17 but in the odoo 14 code there are some model fields that have the filters parameter, for example:

file = fields.Binary('File', filters='.xls')


but I don't understand what that code does since in 17 it returns warnings for that parameter,

does this do anything??? And in case it works for me, how can I use it in version 17???

Avatar
Abbandona
Risposta migliore

Hi,

Please check the code below:

Python:

file = fields.Binary('File')

XML:

<field name="file"  options="{'accepted_file_extensions': '.xls'}"/>

Hope it helps.

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
0
lug 15
3715
1
ott 18
15233
1
apr 19
5315
1
apr 15
6771
2
mar 15
5634