I want to write a domain rule of permission. when user followers an order has permission to the order:
[ '&',('message_follower_ids.res_model','ilike','sale.order'),('message_follower_ids.partner_id', 'in', [user.partner_id.id])]
But it didn't work out.
I want the result in sql is : SELECT * FROM public.mail_followers where partner_id=7 and res_model='sale.order';
Please tell me how write the domain rule
Thanks a lot！