2
votes

I need to create a rule to a user can only see their own customers (SALES / CUSTOMERS in OpenERP menu), similar at rules "personal phone calls" or "personal initiative" in the "Sales / User: Own Leads Only".

I have resolved (partially) the problem with a duplicated group from SALES / USER: OWN LEADS ONLY group, and I have added a new rule based on "res_partner: access (read) on my partner" with the same DOMAIN and I have modified this rule to grant access to read, write, create and delete and now a user only can see his partners but now, when I try create a new partner, like a contact or company, I cant, because the system tell me access denied (document type: partner and action create). I dont know why can't create a new partner.

My version OpenERP is 7.0

Can anyone help me?

Thanks!

Mc

1

1 Answers

1
votes

You need to use this domain in your new record rule:

['|',('user_id','=',False),('user_id','=',user.id)]

After setting this domain in your record rule, save it and again check your scenario.

By applying this domain, You will see your own customers as well as the customers, in which, there is no Salesperson defined. If possible, define salesperson for every customer so it will give you the exact result that you want.