コンテンツへスキップ
メニュー
この質問にフラグが付けられました
2 返信
1601 ビュー

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
8月 25
92
1
8月 25
2039
1
7月 25
2571
2
7月 25
8003
2
7月 25
4456