parameters: (self, partner_ids=None)
docstring: Remove partners from the records followers.
docstring_summary: Remove partners from the records followers.
docstring_tokens: Remove partners from the records followers .
function: def message_unsubscribe(self, partner_ids=None):
          """ Remove partners from the records followers. """
          # not necessary for computation, but saves an access right check
          if not partner_ids:
              return True
          if set(partner_ids) == set([self.env.user.partner_id.id]):
              self.check_access_rights('read')
              self.check_access_rule('read')
          else:
              self.check_access_rights('write')
              self.check_access_rule('write')
          self.env['mail.followers'].sudo().search([
              ('res_model', '=', self._name),
              ('res_id', 'in', self.ids),
              ('partner_id', 'in', partner_ids or []),
          ]).unlink()
function_tokens: def message_unsubscribe ( self , partner_ids = None ) : # not necessary for computation, but saves an access right check if not partner_ids : return True if set ( partner_ids ) == set ( [ self . env . user . partner_id . id ] ) : self . check_access_rights ( 'read' ) self . check_access_rule ( 'read' ) else : self . check_access_rights ( 'write' ) self . check_access_rule ( 'write' ) self . env [ 'mail.followers' ] . sudo ( ) . search ( [ ( 'res_model' , '=' , self . _name ) , ( 'res_id' , 'in' , self . ids ) , ( 'partner_id' , 'in' , partner_ids or [ ] ) , ] ) . unlink ( )