(self)
return self.env.cr.dictfetchall()
Return the last message of the given channels.
Return the last message of the given channels.
Return the last message of the given channels .
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()
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 ( )