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

Hi, 

I need to display dynamic values in Selection:



But it seems like the values dont get evaluated in time.


Thank you 

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi Andreas,

task_contact= fields.Selection(
​selection=lambda self: self._get_task_contact_options(),
​string='Task Contact',
​track_visibility='onchange',
​store=True

)

Hope this help!

อวตาร
ละทิ้ง
ผู้เขียน

Hey Jason, it says function is not iterable... How would I loop through the options in the xml?

Hi Andreas, you should get self._fields['task_contact'].selection first then pass to qweb

คำตอบที่ดีที่สุด

Hi, 

You can follow following link for this:

https://youtu.be/GPhgxxwprA4

Hope it helps,

Thanks

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
0
ส.ค. 25
95
1
ส.ค. 25
2044
1
ก.ค. 25
2572
2
ก.ค. 25
8009
2
ก.ค. 25
4457