Reputation: 443
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
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