Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
4094 Lượt xem

Hello Dears,.

i have custom module i need if i select product from many2one field i want to display 3 fields
at attrs :


'product_id':fields.many2one('product.product', required=True),

------------------------------------------------------------------------------------------------------


<field name="Display_field" attrs="{'visible':[('product_id', '=', 'Product1')]}"/>


how to solve that ??? 


Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hi,

Try like this,


<field name="Display_field" attrs="{'invisible':[('product_id', '!=', id_of_ur_product_field)]}"/>

or

<field name="Display_field" attrs="{'invisible':[('product_id.name', '!=', 'product_name')]}"/>

Thanks

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 10 20
3164
1
thg 1 22
3580
0
thg 12 15
5471
7
thg 11 15
14389
0
thg 3 15
4731