'get the statistics of the rating repatition
:param domain : optional domain of the rating to include/exclude in statistic computation
:return dictionnary where
- key is the the name of the information (stat name)
- value is statistic value : \'percent\' contains the repartition in percentage, \'avg\' is the average rate
and \'total\' is the number of rating'

@api.multi
def rating_get_stats(self, domain=None):

    data = self.rating_get_repartition(domain=domain, add_stats=True)
    result = {'avg': data['avg'], 'total': data['total'], 'percent': dict.fromkeys(range(1, 11), 0)}
    for rate in data['repartition']:
        result['percent'][rate] = (((data['repartition'][rate] * 100) / data['total']) if (data['total'] > 0) else 0)
    return result
