Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
2 Відповіді
7281 Переглядів

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.

Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
2
серп. 25
2714
3
лют. 25
3939
0
трав. 24
46
1
квіт. 24
3583
4
вер. 23
5138