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

I want to run group by on a company dependent field. As, this field is not stored so i cant use it in group by. But i have created other stored fields based on this company dependent field. Now all i need is to get current company in xml.

Here is my code, I want to make this groupby invisible based on current_company_id.

<filter string="Equipment Status" domain="[]"
attrs="{'invisible':[(current_company_id,'=',1)]}"
context="{'group_by' : 'equipment_status_id'}"/>
頭像
捨棄
作者

Can i do it using fields_view_get? If yes can you tell me how does field view work?

最佳答案

Filter does not support the attrs attribute. If you want to make the filter available to a specific set of users, you can use the groups attribute and restrict it's availability to users in the security group(s). In your case, you can define a security group for all the users in that company and use that security group in the filter definition.

頭像
捨棄
作者 最佳答案

I tried, but it says 'user' not defined.

頭像
捨棄
作者

Actually, 'current_company_id' is not working in the search view for hiding this group_by

相關帖文 回覆 瀏覽次數 活動
4
10月 23
5279
1
3月 25
1442
0
11月 24
1610
2
9月 24
1490
0
6月 24
1635