跳至內容
選單
此問題已被標幟
1 回覆
4090 瀏覽次數

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 ??? 


頭像
捨棄
最佳答案

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

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
0
10月 20
3163
1
1月 22
3552
0
12月 15
5463
7
11月 15
14389
0
3月 15
4706