Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
2 Risposte
7116 Visualizzazioni

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
Abbandona
Risposta migliore

Hi, 

You can follow following link for this:

https://youtu.be/GPhgxxwprA4

Hope it helps,

Thanks

Avatar
Abbandona
Risposta migliore

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
Abbandona
Post correlati Risposte Visualizzazioni Attività
3
feb 25
3638
0
mag 24
46
1
apr 24
3393
4
set 23
4895
1
ago 23
2578