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
2686 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
7133
1
wrz 23
4006
1
wrz 23
2749
2
cze 18
4921
2
cze 23
4969