Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
368 Zobrazení

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šit

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

Nejlepší odpověď

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šit
Related Posts Odpovědi Zobrazení Aktivita
2
led 24
3867
0
led 24
1931
0
úno 22
1699
0
pro 20
2444
0
zář 25
5106