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

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

Hi,

Please check the code below:

Python:

file = fields.Binary('File')

XML:

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

Hope it helps.

Avatar
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
0
heinäk. 15
3720
1
lokak. 18
15250
1
huhtik. 19
5325
1
huhtik. 15
6784
2
maalisk. 15
5660