1
votes

openerp-7 HR Recruitment module.

I'm trying to set up per record access security using record rules.

New field ('x_department_id_multi') with many2many type is added. Let's say the field stores name of security group, who are allowed to read the item. If user is added to specific group he shoud see the item.

I am trying to set up this using record rules. Domain: [('x_department_id_multi','=', ???)]

Instead of '???' I have to retrieve inforation: whether user is added to the group or no.

Something like 'user.id', but instead of user.id I want to extract user groups.

How can I achieve that?

I have looked through search and openerp documentation, but found nothing or not related info.

Appreciate your help!

1
The above question is not clear ? do you want to give permission to a group instead ofa user ?Abhishek Jaiswal

1 Answers

0
votes

Lets try this Record Rule Domain Filter:

['|',('user_id', '=', user.id),('group_ids','in',[g.id for g in user.x_department_id_multi])]