Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
5 ตอบกลับ
5884 มุมมอง

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

Related Posts ตอบกลับ มุมมอง กิจกรรม
4
ต.ค. 23
5186
1
มี.ค. 25
1354
0
พ.ย. 24
1536
2
ก.ย. 24
1367
0
มิ.ย. 24
1580