Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
3419 มุมมอง

I have a requirement to create the selection field role : fields.selection[ (1,'January'), (2,'February'), (3,'March'), (4,'April'), (5,'May'), (6,'June'), (7,'July'), (8,'August'), (9,'September'), (10,'October'), (11,'November'), (12,'December')]

Now i want to hide the value January to all my users :-) How to achieve thi

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

A solution can be to create a many2one field with selection widget that is in relation with a simple table called ir_month when you put the months. In this class the name field is the month name and ypou must insert a boolean field called hide. If haide is True the month doesn't show because you insert a domain on a field like this:

[('hide', '=', False)]
อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
4
ธ.ค. 23
22156
5
ก.ค. 24
15475
Working with fields.selection values แก้ไขแล้ว
1
มิ.ย. 22
27005
9
พ.ค. 22
53248
0
ก.ค. 20
2888