Skip to Content
Menu
This question has been flagged

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
Discard

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

Best Answer


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
Discard
Author

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)

Author

@ 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).

Related Posts Replies Views Activity
2
Apr 23
1739
0
Feb 21
762
3
Sep 20
3280
0
Jul 22
1902
0
Jun 23
3568