Skip to Content
Menu
This question has been flagged
1 Odpoveď
374 Zobrazenia

Hello. I am using Odoo Online (saas-18.3). 

Currently, any user can mark as done, edit or delete the tasks, even the ones assigned to other users. I want only the asignee or asigned to be able to complete the task.


The ACL is set as:

Name: mail.activity user 

Model: Activity

Group: Internal User

Access rights: Read, Write, Create, Delete


And there is a record rule which I would assume should solve my issue but it´s not:

Name: mail.activity: user: write/unlink only (created or assigned)

Model: Activity

Group: Internal User

Domain: ['|', ('user_id', '=', user.id), ('create_uid', '=', user.id)]

Access rights: Write, Delete


Not sure if I am missing something. I also find it odd that this is Odoo´s default behaviour with tasks?

Thank you.

Avatar
Zrušiť

People work in Teams and if someone is sick, then others chip in and help them with their Activities.

Best Answer

Hi,

You cannot add custom Python code or modules, but you can still use record rules to narrow permissions:


Go to Settings → Technical → Security → Record Rules (developer mode must be enabled).


Create a new rule for the project.task model:


Name: Tasks: only assignee or creator can write/unlink


Groups: Internal User (or only the Project User group, depending on your needs)


Domain:


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



Access rights (checked): Write, Delete


Keep Read unchecked, so all project members can still view tasks.


Make sure the rule applies in addition to the default ones (don’t remove Odoo’s base rules unless necessary).


Hope it helps.

Avatar
Zrušiť
Related Posts Replies Zobrazenia Aktivita
2
jan 24
3872
0
jan 24
1936
0
feb 22
1703
0
dec 20
2447
0
sep 25
5106