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

Hi,

I need to allow salesperson to see his customer only when he logged in through his account. for that I created a new group and create a record rule.

<record id="customer_only" model="ir.rule">
<field name="name">Own Customer Only</field>
<field ref="base.model_res_partner" name="model_id"/>
<field name="domain_force">['|',('user_id','=',user.id),('user_id','=',False)]</field>
<field name="groups" eval="[(4, ref('module_name.group_id'))]"/>
</record>

but still salesperson can see others salesperson's customers. and their is no other rule applied to the res.partner module.

could anyone help me resolve this.

Thanks in advance!

Ảnh đại diện
Huỷ bỏ

If there are no other rules for the same model, just make sure that the newly create group is assigned for the logged in user whom you selected to test

Tác giả

Hi Niyas,

newly created group is assigned to the test user.

Bài viết liên quan Trả lời Lượt xem Hoạt động
3
thg 8 23
6456
1
thg 3 22
2881
0
thg 10 20
3490
1
thg 9 18
5444
2
thg 1 24
3356