跳至内容
菜单
此问题已终结
1 回复
650 查看

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.

形象
丢弃
相关帖文 回复 查看 活动
0
7月 15
3713
1
10月 18
15218
1
4月 19
5309
1
4月 15
6766
2
3月 15
5614