Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
593 Tampilan

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]]}

 


Avatar
Buang
Jawaban Terbai

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"




Avatar
Buang