Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
1 Antworten
155 Ansichten

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
Verwerfen

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

Beste Antwort

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
Verwerfen
Verknüpfte Beiträge Antworten Ansichten Aktivität
2
Jan. 24
3387
0
Jan. 24
1633
0
Feb. 22
1492
0
Dez. 20
2168
0
Sept. 25
5106