Skip to Content
Menu
This question has been flagged
1 Atsakyti
3193 Rodiniai

Hello,


we have a multi-company setup. I am creating an app (using Studio) and I would like to set up a default filter so that users from each company would see just records for that company.


Something like this:

[["x_studio_many2one_field_crAZL.id","=","user.company_id"]]

x_studio_many2one_field_crAZL is the Companies>ID


But this does not work. Is there a way to do this? Or is there a better way?


Thanks,

Jiri


Portretas
Atmesti
Best Answer

Create a new Record rule from setting, domain filter should be as:
['|',('company_id','=',False),('company_id', 'in', company_ids)]

Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
1
gruod. 21
3974
1
rugp. 22
4408
0
birž. 22
2065
2
saus. 22
2844
1
rugs. 21
3047