跳至内容
菜单
此问题已终结
1 回复
2593 查看

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.

形象
丢弃
最佳答案

Hello 

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

形象
丢弃
相关帖文 回复 查看 活动
2
8月 17
7033
1
9月 23
3893
1
9月 23
2589
2
6月 18
4783
2
6月 23
4863