تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
2629 أدوات العرض

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
أغسطس 17
7072
1
سبتمبر 23
3937
1
سبتمبر 23
2648
2
يونيو 18
4828
2
يونيو 23
4892