parameters: (self)
return_statement: return self.env.cr.dictfetchall()
docstring: Return the last message of the given channels.
docstring_summary: Return the last message of the given channels.
docstring_tokens: Return the last message of the given channels .
function: def _channel_last_message_ids(self):
          """ Return the last message of the given channels."""
          if not self:
              return []
          self.flush()
          self.env.cr.execute("""
              SELECT res_id AS id, MAX(id) AS message_id
              FROM mail_message
              WHERE model = 'mail.channel' AND res_id IN %s
              GROUP BY res_id
              """, (tuple(self.ids),))
          return self.env.cr.dictfetchall()
function_tokens: def _channel_last_message_ids ( self ) : if not self : return [ ] self . flush ( ) self . env . cr . execute ( """
              SELECT res_id AS id, MAX(id) AS message_id
              FROM mail_message
              WHERE model = 'mail.channel' AND res_id IN %s
              GROUP BY res_id
              """ , ( tuple ( self . ids ) , ) ) return self . env . cr . dictfetchall ( )