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
2555 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
6996
1
wrz 23
3872
1
wrz 23
2548
2
cze 18
4742
2
cze 23
4814