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

Hello

I am trying to create a record rule (Odoo 16) that hides all suppliers for users who are not assigned to the user group "Purchase / Users".

So far I've created an additional record rule for the model res.partner with the rule definition (domain filter): [('supplier_rank', '>', 0)]

Also I've added the group "Purchase / User" on this record rule.

This rule doesn't change anything. Users which are not assigned to the group still can see every supplier.

This rule used to work for me in odoo 12.

Thanks for all the help.

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

The record rule did not work because of another odoo standard rule: res.partner.rule.private.employee

I changed the domain of this rule from ['|', ('type', '!=', 'private'), ('type', '=', False)] to ['|', ('type', '!=', 'private'), ('type', '=', False),('supplier_rank','

Now it works.

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 5 25
1202
1
thg 7 24
1662
4
thg 12 23
24265
1
thg 8 22
2052
1
thg 10 21
2267