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

I created multi company set up in odoo but I can see users of company A in company B

I tried this but

['|', ('id', '=', user.id), ('company_ids', 'in', company_ids)]

but I got this error 

ValueError: Invalid field 'company_ids' in leaf "<osv.ExtendedLeaf: ('company_ids', 'in', [3, 2, 1]) on res_partner (ctx: )>"
I think because the field `company_ids` is not available in `res.partner` 

so I used `company_id` inside of `company_ids`

['|', ('id', '=', user.id), ('company_id', 'in', company_ids)]
this made users see only their own coworkers and customers.
but how to make exception for admin or a (user group) 

Company A, Company B, Company C

I want (Company A) admins to see user of Both users of company (Company B, Company C)
but (Company B, Company C) can only see there users only 


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

Hi,

You can restrict the rule to a specific group or add another rule (with admin group and keep the rule definition as []).


Regards

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 9 22
2433
4
thg 5 21
29103
2
thg 11 23
9090
0
thg 2 21
2390
0
thg 7 20
3216