Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Different behavior of many2many field compare to many2one field after applying security rule.

By
Amit Kumar
on 11/9/15, 6:13 AM 398 views

I have added a fields in a hr.deparment model, which is many2many with hr.employee with name reporting_manager_ids.

Then applied a rule on hr.employee model to show employee own record only. Rule is mention below.

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

My question is that there is already a field name manager_id in hr.department, which is many2one  with hr.employee and when a normal employee( user with group Employee of Hr Module ) trying to view department in their employee record he is not able to see  reporting_manager_ids values because this field contains hr.employee records, but he can see the value of  manager_id field that also contains hr.emolyee records. Why?

Please guide me and suggest me a solution to show the employee record in reporting_manager_ids. Employee can only see this field.

Thank you in advance.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 11/9/15, 6:13 AM
Seen: 398 times
Last updated: 11/9/15, 6:15 AM