Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
5 Risposte
5831 Visualizzazioni

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
Abbandona
Autore

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

Risposta migliore

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
Abbandona
Autore Risposta migliore

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

Avatar
Abbandona
Autore

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

Post correlati Risposte Visualizzazioni Attività
4
ott 23
5105
1
mar 25
1256
0
nov 24
1462
2
set 24
1305
0
giu 24
1540