Skip to Content
Menú
This question has been flagged
2 Respostes
7115 Vistes

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'),

Avatar
Descartar
Best Answer

Hi, 

You can follow following link for this:

https://youtu.be/GPhgxxwprA4

Hope it helps,

Thanks

Avatar
Descartar
Best Answer

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.

Avatar
Descartar
Related Posts Respostes Vistes Activitat
3
de febr. 25
3632
0
de maig 24
46
1
d’abr. 24
3388
4
de set. 23
4892
1
d’ag. 23
2575