Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
2 Antwoorden
7032 Weergaven

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
Annuleer
Beste antwoord

Hi, 

You can follow following link for this:

https://youtu.be/GPhgxxwprA4

Hope it helps,

Thanks

Avatar
Annuleer
Beste antwoord

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
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
3
feb. 25
3506
0
mei 24
46
1
apr. 24
3330
4
sep. 23
4818
1
aug. 23
2512