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

How can i define a dynamic selection field where the user can add new items that are not predefined this code define a static selection field:

score:field.selection([('key1','value1').....],string='score'),

アバター
破棄
最善の回答

Hi, 

You can follow following link for this:

https://youtu.be/GPhgxxwprA4

Hope it helps,

Thanks

アバター
破棄
最善の回答

Hi, try this:

def _dinamic_selection(self):
    list_field = []
    # add elementos to list
    return list_field


_columns = {
    'field_selecction' : fields.selection('_dinamic_selection', 'Dinamic Field Selection'),
}


I hope you help, regards.

アバター
破棄
関連投稿 返信 ビュー 活動
3
2月 25
3591
0
5月 24
46
1
4月 24
3373
4
9月 23
4869
1
8月 23
2554