Skip to Content
Menu
Dette spørgsmål er blevet anmeldt
2 Besvarelser
1621 Visninger

Hi, 

I need to display dynamic values in Selection:



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


Thank you 

Avatar
Kassér
Bedste svar

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!

Avatar
Kassér
Forfatter

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

Bedste svar

Hi, 

You can follow following link for this:

https://youtu.be/GPhgxxwprA4

Hope it helps,

Thanks

Avatar
Kassér
Related Posts Besvarelser Visninger Aktivitet
0
aug. 25
141
1
aug. 25
2090
1
jul. 25
2588
2
jul. 25
8024
2
jul. 25
4474