Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
3202 Lượt xem

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


Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 12 21
3986
1
thg 8 22
4418
0
thg 6 22
2107
2
thg 1 22
2847
1
thg 9 21
3069