I created a custom module where you can link multiple contacts in a many2many field and I want to automatically add them all as a follower. I've read this article:
Automated Action to Add Users as Followers Odoo 12
Adding followers works fine, but only when the fields have ONE user or partner in it. In my installation these are many2many fields. When I add more then one user or partner in one of the fields, the code crashes.
Do I need to change something in this code when I want to add more then 1 contact or user in one of the fields?
I have this python code in my automated action:
record.message_subscribe(partner_ids=[record.field1.id, record.field2.partner_id.id, record.field3.partner_id.id])
field1 = partner
field2 & field3 = user
Thanks for your help!