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

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
3015
0
5月 24
46
1
4月 24
3099
4
9月 23
4541
1
8月 23
2286