This question has been flagged
3 Replies
2673 Views

I am trying to hide project task from users who are not assigned to the task or are not followers of that task.

So far I had now luck.

I thought a record rule like this: ['|',('user_id','=',False),('user_id','=',user.id)]

would work but still all tasks are shown to my test user. I hope someone has some pointers for.


Thank you in advance.


Avatar
Discard
Author

Update: it does work as Global but not when implemented in a group.

Author Best Answer

In Odoo 11 I found that the standard project user inherits Employees \ Employee which in turn has the rule Project/Task: employees: follow required for follower-only projects which let users see the other tasks.

What I did:

  1. create a new group -> duplicate of Project / Users

  2. implemented the rule from odony's answer -> ['|',('user_id','=',False),('user_id','=',user.id)]

  3. removed the record rule Project/Task: employees: follow required for follower-only projects from Employees / Employee and added it to Project / Users

Now I can decide who is a project user, who can see all tasks of a project, and who is a worker, who only gets to see tasks assigned to them.

Avatar
Discard