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

i have 2 selections fields in a one2many field. options for the 1st selection field is given in py file. and options of 2nd selection field depends on the value of 1st selection field. any idea? i had 1st initialized the 2nd selection field with an empty list , and on onchange of 1st selection i had updated the empty list but the updated empty list is not showing in the xml(in view). any idea? or any another method?

形象
丢弃
编写者 最佳答案

hi,

ok, thank you :)

形象
丢弃
最佳答案

Hi,

I think this method will not work, bcz the selection fields just populated when the form is loaded; so the onchange function will not fill the selections. You can make the second selection a many2one field to a new model that preserve your data, and the onchange function return just a domain to the desired ids in that many2one field.


Hope this could helps ...

形象
丢弃
相关帖文 回复 查看 活动
4
10月 18
4143
1
3月 15
4672
2
9月 23
5701
5
7月 22
6079
2
4月 18
12499