Skip to Content
Menu
This question has been flagged
1011 Views

Hi all,


currently v13 upgrading to v16 in january.


We are implementing the vendor bills approval process with activities right now.

Vendor Bill coming in, adding activity for the user to approve the bill.


Now I want to restrict, that users can only see their bills where they had an activity added. With adding the activity they are also added as followers on the vendor bill.


So basically the record rule is working fine, that I can only see were I was follower

[('message_is_follower','=',True),('type', 'in', ('out_invoice', 'out_refund', 'in_invoice', 'in_refund'))]


But if I implement the record rule, I am not able to add activities for users anymore, cause the user is no follower on the vendor bill, at the time I want to add the activity.

Odoo first adds the activity to a document and then adds the follower afterwards.


I don´t really want to code in the exception in  _check_access_assignation on mail_activity.py cause I think it would be no good idea to lever out the record rule logic here.


Any ideas how to handle this correctly - in best with odoo standard?



Best Regards



Avatar
Discard
Related Posts Replies Views Activity
0
Jun 23
2222
0
Oct 22
2055
0
Oct 22
2188
2
Oct 21
4507
1
May 21
12763