跳至内容
菜单
此问题已终结
2 回复
1225 查看

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

形象
丢弃
相关帖文 回复 查看 活动
0
5月 25
12
2
1月 25
2538
1
12月 24
6216
1
11月 24
2694
1
11月 24
2005