'Override to update the parent mail statistics. The parent is found
by using the References header of the incoming message and looking for
matching message_id in mail.mail.statistics.'

@api.model
def message_route_process(self, message, message_dict, routes):

    if message.get('References'):
        message_ids = [x.strip() for x in decode_smtp_header(message['References']).split()]
        self.env['mail.mail.statistics'].set_replied(mail_message_ids=message_ids)
    return super(MailThread, self).message_route_process(message, message_dict, routes)
