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

I have a tree view in which I want to display a column depending on the value of another field. To be specific, in the `Inventory` app, I want to add a column in the tree view when the picking type is 'Internal Transfers'. I do not want to show the same column in any other picking type.


Please note, I am customizing this in Odoo Enterprise Edition.


I did `attrs="{'invisible': [('x_picking_type_name','=', 'Internal Transfers')]}"`, where `x_picking_type_name` is a custom field in the model `stock.picking`. I am able to hide values in the records but the column remains in other picking types (i.e. picking types other than 'Internal Transfers').


I suppose, there is a way around with context but I could not make it work. I will appreciate any help on this.

頭像
捨棄
最佳答案

There isn't a way to do this.  Either the field is visible or not, you can only hide values inside that field.

You would have to have two menus, with two different views - one for Internal Transfers, one for NOT Internal Transfers.

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
11月 24
20079
1
9月 23
2940
3
5月 23
5537
7
4月 23
48875
1
12月 22
7761