original_docstring:  Computes:
              - message_subtype_data: data about document subtypes: which are
                  available, which are followed if any 
docstring: data about document subtypes: which are
  available, which are followed if any
docstring_tokens: data about document subtypes : which are available which are followed if any
code: def read_subscription_data(self, res_model, follower_id):
          """ Computes:
              - message_subtype_data: data about document subtypes: which are
                  available, which are followed if any """
          followers = request.env['mail.followers'].browse(follower_id)
  
          # find current model subtypes, add them to a dictionary
          subtypes = request.env['mail.message.subtype'].search(['&', ('hidden', '=', False), '|', ('res_model', '=', res_model), ('res_model', '=', False)])
          subtypes_list = [{
              'name': subtype.name,
              'res_model': subtype.res_model,
              'sequence': subtype.sequence,
              'default': subtype.default,
              'internal': subtype.internal,
              'followed': subtype.id in followers.mapped('subtype_ids').ids,
              'parent_model': subtype.parent_id.res_model,
              'id': subtype.id
          } for subtype in subtypes]
          subtypes_list = sorted(subtypes_list, key=lambda it: (it['parent_model'] or '', it['res_model'] or '', it['internal'], it['sequence']))
          return subtypes_list
code_tokens: def read_subscription_data ( self , res_model , follower_id ) : followers = request . env [ 'mail.followers' ] . browse ( follower_id ) subtypes = request . env [ 'mail.message.subtype' ] . search ( [ '&' , ( 'hidden' , '=' , False ) , '|' , ( 'res_model' , '=' , res_model ) , ( 'res_model' , '=' , False ) ] ) subtypes_list = [ { 'name' : subtype . name , 'res_model' : subtype . res_model , 'sequence' : subtype . sequence , 'default' : subtype . default , 'internal' : subtype . internal , 'followed' : subtype . id in followers . mapped ( 'subtype_ids' ) . ids , 'parent_model' : subtype . parent_id . res_model , 'id' : subtype . id } for subtype in subtypes ] subtypes_list = sorted ( subtypes_list , key = lambda it : ( it [ 'parent_model' ] or '' , it [ 'res_model' ] or '' , it [ 'internal' ] , it [ 'sequence' ] ) ) return subtypes_list
short_docstring: Computes:
   message_subtype_data: data about document subtypes: which are
  available, which are followed if any
short_docstring_tokens: Computes : message_subtype_data : data about document subtypes : which are available which are followed if any
comment: """ Computes:
              - message_subtype_data: data about document subtypes: which are
                  available, which are followed if any """$SEP$# find current model subtypes, add them to a dictionary