Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
5 Antwoorden
5847 Weergaven

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'}"/>
Avatar
Annuleer
Auteur

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

Beste antwoord

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.

Avatar
Annuleer
Auteur Beste antwoord

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

Avatar
Annuleer
Auteur

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

Gerelateerde posts Antwoorden Weergaven Activiteit
4
okt. 23
5121
1
mrt. 25
1271
0
nov. 24
1475
2
sep. 24
1317
0
jun. 24
1547