Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
2638 Lượt xem

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.

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hello 

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

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 8 17
7079
1
thg 9 23
3969
1
thg 9 23
2686
2
thg 6 18
4848
2
thg 6 23
4906