Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
5088 มุมมอง

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

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
4
ต.ค. 18
4260
1
มี.ค. 15
4815
2
ก.ย. 23
5857
One2many domain on the selection แก้ไขแล้ว
5
ก.ค. 22
6197
2
เม.ย. 18
12681