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

I have a selection field as follows:


source = fields.Selection([
('one', 'First'),
('two', 'Second'),
('three', 'Third'),
('four', 'Fourth'),
('five', 'Fifth'),
], required=True, default='one')


How can I show but inactive some of these options?


at the moment these options are all visible and selectable but I want some to be visible but inactive so not being selectable.

Аватар
Відмінити
Найкраща відповідь

Hello 

you can not inactive but based on your condition you can add and remove using fields_view_get method

Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
2
серп. 17
7083
1
вер. 23
3980
1
вер. 23
2692
2
черв. 18
4868
2
черв. 23
4924