Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
2 Risposte
4995 Visualizzazioni

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
Abbandona
Autore Risposta migliore

hi,

ok, thank you :)

Avatar
Abbandona
Risposta migliore

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
Abbandona
Post correlati Risposte Visualizzazioni Attività
4
ott 18
4188
1
mar 15
4712
2
set 23
5740
5
lug 22
6137
2
apr 18
12554