Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
2 Răspunsuri
1608 Vizualizări

Hi, 

I need to display dynamic values in Selection:



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


Thank you 

Imagine profil
Abandonează
Cel mai bun răspuns

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!

Imagine profil
Abandonează
Autor

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

Cel mai bun răspuns

Hi, 

You can follow following link for this:

https://youtu.be/GPhgxxwprA4

Hope it helps,

Thanks

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
0
aug. 25
96
1
aug. 25
2046
1
iul. 25
2573
2
iul. 25
8011
2
iul. 25
4463