تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
5 الردود
5935 أدوات العرض

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
أكتوبر 23
5279
1
مارس 25
1437
0
نوفمبر 24
1607
2
سبتمبر 24
1487
0
يونيو 24
1634