Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
1589 Widoki

Hi, 

I need to display dynamic values in Selection:



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


Thank you 

Awatar
Odrzuć
Najlepsza odpowiedź

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!

Awatar
Odrzuć
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

Najlepsza odpowiedź

Hi, 

You can follow following link for this:

https://youtu.be/GPhgxxwprA4

Hope it helps,

Thanks

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
0
sie 25
89
1
sie 25
2033
1
lip 25
2568
2
lip 25
7998
2
lip 25
4446