M Tahir Noor
M Tahir Noor

Reputation: 443

Restrict partner to display in odoo

I want to add record level restriction in odoo. I want display just that partners to current login user which state_id equals to state_id of current login user.

Upvotes: 1

Views: 624

Answers (1)

Nilesh Sheliya
Nilesh Sheliya

Reputation: 591

For that you have to add Record Rule from Settings/Technical/Security/Record Rules menu. In that you have to set object as Partner (res.partner). Need to set Rule Definition(Domain Filter) like below code and just save it.

[('state_id','=',user.partner_id.state_id.id)]

Upvotes: 1

Related Questions