Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to Remove followers linked to old partner in OpenERP(Odoo)?

    • 0
    • 0
    • 0
    • 0
    • 1
    • 0
    • 0
    • 0
    • 686
    Comment on it

    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)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: