Files
odoo_source/addons/rating
Nicolas Martinelli ca3b3d894b [FIX] rating: count and average
In an app using rating (e.g. eLearning), get 3 ratings:
- A 5-star review
- A 3-star review
- A 0-star review

The average is 2.5 stars, while it should be 4 stars.

This happens because the 0-star review is taken into account in the
average computation, while it shouldn't. Indeed, zero star means no
review.

We apply the same login than:
https://github.com/odoo/odoo/blob/0028a602bea6a48aaa2747127ec075394732b324/addons/rating/models/rating_mixin.py#L205

opw-2290617

closes odoo/odoo#54279

X-original-commit: 4f7981f80fb55ab4bf8b30d137e45b4fda4013cd
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-07-09 13:51:28 +00:00
..
2020-07-09 13:51:28 +00:00