İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
2580 Görünümler

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.

Avatar
Vazgeç
En İyi Yanıt

Hello 

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

Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
2
Ağu 17
7029
1
Eyl 23
3887
1
Eyl 23
2585
2
Haz 18
4767
2
Haz 23
4857