Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
2 Ответы
1596 Представления

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
91
1
авг. 25
2037
1
июл. 25
2569
2
июл. 25
7999
2
июл. 25
4452