This question has been flagged
1 Reply
2742 Views

I think I missing something security of odoo . that i want to reach:

In project module i want have 3 group roles:

User

Senior user

Manager

I have created user like this and :

<record id="group_project_senior_user" model="res.groups">
<field name="name">Senior user</field>
<field name="category_id" ref="base.module_category_project_management"/>
<field name="implied_ids" eval="[(4, ref('project.group_project_user'))]"/>
</record>
<record id="project.group_project_manager" model="res.groups">
<field name="implied_ids" eval="[(4, ref('my_module.group_project_senior_user'))]"/>
</record>

and i want:

User can see only tasks they are assigned.

Senior user task they are following or are assigned

manager see all tasks


To filter records to user group i have created record rule in project.task to user group:

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

all other record rules are default odoo rules.


So now if i create project with visability private project:followers only. adds user of users group to followers of the project. i create two tasks one assign to user other assign administrator.

User group member can see both tasks.


Maybe someone can guide me what can i do to reach this functionality

Thanks in advance!

Avatar
Discard
Best Answer

Hello Zilvinas,


I was facing same issue.


In the project.task, there is one predefined Record Rule which name is

Project/Task: employees: portal or employee or (followers and following).


When i deactive this Record rule, it's works for me.

Thanks,


Avatar
Discard