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
3349 Zobrazení

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

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

Nejlepší odpověď


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
Zrušit
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).

Related Posts Odpovědi Zobrazení Aktivita
2
dub 23
2758
0
úno 21
1579
3
zář 20
4192
0
čvc 22
3021
0
čvn 23
4418