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

There is a record rule for model “Contact” that separates contact books for each company:

​['|','|',('company_id.child_ids','child_of',[user.company_id.id]),('company_id','child_of',[user.company_id.id]),('company_id','=',False)]

And now if I’m a user with current company “A” I can see only contact info for users with current company “A”. 

I would like to change it so that if I’m a user with current company “A” I can see contact info of all the users that have company “A” in theirs Allowed company (rather that only current company).

How do I do this? As far as I can see Contact model does not hold information about Allowed companies and have only current company.

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

Hello Andrzej,


You can user the following domain in record rule:

[('company_id', 'child_of', user.company_ids.ids)]

 Hope it will helpful for you


Thanks and regards

Haresh Kansara 

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 7 23
207
1
thg 4 22
3526
4
thg 12 23
24438
0
thg 11 19
5033
0
thg 8 19
4002