Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
354 Visualizzazioni

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
Abbandona

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

Risposta migliore

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
Abbandona
Post correlati Risposte Visualizzazioni Attività
2
gen 24
3855
0
gen 24
1927
0
feb 22
1679
0
dic 20
2441
0
set 25
5106