This question has been flagged
1 Reply
5374 Views

I am working with Odoo v13 Enterprise.

I noticed that an Activity can be scheduled for a User but they can CANCEL it, and there is no Chatter record that it was canceled.

I noticed that an Activity can be scheduled for a User but ANOTHER User can complete it.

I don't want to support either of these things.  We are using Activities to encourage good behavior (have automated the creation of Approval Activities in some cases) and canceling them without leaving a note that they were canceled does NOT encourage good behavior.  (It encourages people to bypass the Approval Activity)

Avatar
Discard
Best Answer

It is possible to create an Automated Action to enforce "Users can only cancel or complete their own Activities" like this:

for record in records:
if record.user_id.id != env.uid:
raise Warning("Only %s can act on this Activity!" % (record.user_id.name))


Users who try to CANCEL or mark DONE an Activity not assigned to them will see:


Avatar
Discard

Thank You