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

I'm trying to "hide" the column header from a list based on a checkbox condition. For example: if the checkbox is true, the column should be shown; otherwise, the entire column, including the header, should be hidden. I have noticed is that it only hides the content data or values, but not the header. I would like to confirm if it's possible to hide the header as well.

Sample Code:

 //

// {"invisible": [["x_studio_checkbox", "=", False]]}

 


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

You can use the nolabel attribute. To always hide the label, you can set nolabel="1", in your case, something like this should work:

{"invisible": [["x_studio_checkbox", "=", False]], "nolabel": [["x_studio_checkbox", "=", False]]}

// Odoo 17: field name="field_name" invisible="x_studio_checkbox == False" nolabel="x_studio_checkbox == False"




อวตาร
ละทิ้ง