Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
1 Responder
3358 Visualizações

i have an issue that my users do not wish for other users to see there Calendar / leave 


when in calendar how do i remove the "Everybody's Calendar" option 

and also i want to limit the drop down the that user only


i have tried record rule, but cant seem to find the right path, please help

Odoo 14

Avatar
Cancelar

"I tried a record rule" - it would make it easier to help you if you posted WHAT you tried, since we can't guess!

Melhor resposta


You have three options:


1. Users can make events PRIVATE:



2. You can create a Record Rule to restrict access:


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


3. You can also just create a DOMAIN on the Window Action like this:

[('create_uid','=',uid)]



Avatar
Cancelar
Autor

I'll try 2/3 I'm sure I've done these with no success.... 1 won't work, as people will know if it shows busy, there on leave (it's all were using this for at the moment)

Autor

@ Ray,

i was using this and causing an error

[('id', 'child_of', [employee.id for employee in user.employee_ids])]

so manager or anyone above could see.... dont suppose you want to point out where i went wrong?

The way to think about a domain for a record rule is "COLUMN ON THE RECORD I WANT TO CONTROL ACCESS TO" "OPERATOR" "VALUE". So you are asking Odoo to restrict access to events where "ID" - but ID is a value assigned by the database and will be different for each database - instead of ID you should have a field on the event that represents something you can compare with VALUE? What field on the Event do you think is a good candidate to compare with a value or some kind (the second part of your domain).

Publicações relacionadas Respostas Visualizações Atividade
2
abr. 23
2763
0
fev. 21
1580
3
set. 20
4194
0
jul. 22
3022
0
jun. 23
4424