Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odpovědi
4961 Zobrazení

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?

Avatar
Zrušit
Autor Nejlepší odpověď

hi,

ok, thank you :)

Avatar
Zrušit
Nejlepší odpověď

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

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
4
říj 18
4115
1
bře 15
4667
2
zář 23
5674
5
čvc 22
6055
2
dub 18
12475