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

Hi everyone,


I want to be able to hide certain columns in project.task.list:


This works:

<field name="x_studio_so_line_notes_rel" optional="show" column_invisible="1"/>

<field name="x_studio_so_line_notes_rel" optional="show" column_invisible="1 == 1"/>


But nothing else works:

<field name="x_studio_so_line_notes_rel" optional="show" column_invisible="project_id.active"/>

<field name="x_studio_so_line_notes_rel" optional="show" column_invisible="x_studio_bool_test"/>


I want to keep the column hidden if project_id.x_studio_order_type != 'Order'


What am I doing wrong? Any workaround?

Thank you!

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

Hi,


Please try the code below.


<field name="x_studio_so_line_notes_rel" optional="show" column_invisible="parent.project_id.active"/>


Hope it helps

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

https://www.odoo.com/documentation/19.0/developer/reference/user_interface/view_architectures/generic_attribute_column_invisible.html

You need a Python expression that doesn't rely on subtree values (so parent values).


อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ส.ค. 25
1114
1
พ.ย. 22
3396
2
เม.ย. 19
8471
1
มี.ค. 15
4355
Add a column to the "list view" แก้ไขแล้ว
1
มี.ค. 15
6812