In followers linked to old partner fields first we have to go in .py file (Python file) After that we have to decide where we want to remove followers linked to old partner fields and then write python code to that field from start to end.
Use below .py code in python file:
cr, uid, ids, vals, context = _get_args(self, args, kwargs)
for field in fields:
direct_field = field.split('.')[0]
if direct_field in vals and ids:
for record in self.pool[self._name].browse(cr, SUPERUSER_ID, ids, context):
contacts = record.mapped(field)._get_contacts_to_notify()
record.message_unsubscribe(contacts.ids)
res = method(self, args, *kwargs)
1 Comment(s)