İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
662 Görünümler

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
Vazgeç
En İyi Yanıt

Hi,

Please check the code below:

Python:

file = fields.Binary('File')

XML:

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

Hope it helps.

Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
0
Tem 15
3715
1
Eki 18
15228
1
Nis 19
5311
1
Nis 15
6769
2
Mar 15
5621