Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
2824 Widoki

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.

Awatar
Odrzuć
Najlepsza odpowiedź

Hello 

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

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
2
sie 17
7251
1
wrz 23
4129
1
wrz 23
2959
2
cze 18
5075
2
cze 23
5167