Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
671 Представления

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???

Аватар
Отменить
Лучший ответ

Hi,

Please check the code below:

Python:

file = fields.Binary('File')

XML:

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

Hope it helps.

Аватар
Отменить
Related Posts Ответы Просмотры Активность
0
июл. 15
3716
1
окт. 18
15238
1
апр. 19
5319
1
апр. 15
6776
2
мар. 15
5642