2017-07-20 30 views

Trả lời

6
<xpath expr="//field[@name='partner_id']" position="attributes"> 
     <attribute name="invisible">1</attribute> 
</xpath> 
3

Đây là cách tốt nhất để ẩn bất kỳ trường nào khỏi chế độ xem.

<xpath expr="//field[@name='partner_id']" position="attributes"> 
    <attribute name="invisible">1</attribute> 
</xpath> 
0

Một cách khác mà bạn có thể thực hiện là

<field name="partner_id" position="replace"> 
    <field name="partner_id" invisible="1" /> 
</field> 

Đây chỉ là một thay thế các giải pháp trên.

0

Cách thay thế với nhiều chi tiết hơn để tạo trường vô hình, chỉ đọc vv cùng một lúc dựa trên điều kiện cụ thể.

<xpath expr="//field[@name='partner_id']" position="attributes"> 
    <attribute name="attrs">{'invisible': [('field_name', 'Operator', Value)], 
          'readonly': [('field_name', 'Operator', Value)]} 
    </attribute> 
</xpath> 
Các vấn đề liên quan