This question has been flagged
3 Replies
4758 Views

I'm trying to restrict the view for employees of Activities scheduled for their manager.

Reason:

The reason for this is mainly based around appraisals. Once an appraisal is sent out two activities are scheduled, one for the employee one for the manager. In this activity the link to the survey for both Manager & Employee is accessible, meaning an employee can fill out the managers for and set the activity to done.

My Solution:

When trying to limit the access rights of employees to only their own activities I have Changed the Record rule mail.activity(this is the [('user_id', '=', user.id)]): user to apply to read (previously only Apply for Write & Apply for Delete).
 

this seems to work in terms of view however seems to "break" other applications - for example Leaves.

As new activities are created for the manager when a leave request is made this seems to block the utility of Leaves and any other application that generates activities for the employee manager. Example below:
"The requested operation cannot be completed due to security restrictions. Please contact your system administrator.

(Document type: mail.activity, Operation: read) "
Does anyone have any idea how I could solve this problem? ANY HELP would be much appreciated! - Or a different way to go about it - I want activities to be visible only to the person to which it is attributed, or delete the activities created within appraisal.

Thank you! (wanted to include screenshots but doesn't seem to work unfortunately)

Avatar
Discard
Author Best Answer

Hi Pinakin

That is exactly what I did!

However as the read action is needed for validating a leave (or any action that creates an activity for your manager) this solution doesn't work :( as it indirectly blocks other applications.

 

Avatar
Discard
Best Answer

There is already record rule for activity where you can restrict the read access, so user can not see other person's activities. Also he can create for another person but can't see if he has not created that activity.


Avatar
Discard
Best Answer

Can you use a tag on the activity (for appraisals) and then have a separate record rule that only applies to activities with that tag (or add a field for the same purpose)?

Avatar
Discard