diff options
| author | David Beguin <dbe@odoo.com> | 2021-01-18 10:37:37 +0000 |
|---|---|---|
| committer | Thibault Delavallée <tde@odoo.com> | 2021-03-29 08:45:17 +0000 |
| commit | ed408d45e8d35eff94a73e37183cbf2e91833f15 (patch) | |
| tree | d73fa59c2762afb5a2ef5f4f2fc11c38f6edf066 /addons/website_livechat/controllers/main.py | |
| parent | da1d2ca0c593e6179b166f94f2e280445e059da7 (diff) | |
[FIX] im_livechat, website_livechat: fix rating values
Rating values have been reviewed to be between 1 and 5 but not in livechat apps.
This commit align rating values.
Task ID-2301261
PR odoo/odoo#60549
Diffstat (limited to 'addons/website_livechat/controllers/main.py')
| -rw-r--r-- | addons/website_livechat/controllers/main.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/website_livechat/controllers/main.py b/addons/website_livechat/controllers/main.py index b3749180ee8..56a263e01d2 100644 --- a/addons/website_livechat/controllers/main.py +++ b/addons/website_livechat/controllers/main.py @@ -36,7 +36,8 @@ class WebsiteLivechat(LivechatController): ratings_per_partner = {partner_id: dict(great=0, okay=0, bad=0) for partner_id in ratings.mapped('rated_partner_id.id')} total_ratings_per_partner = dict.fromkeys(ratings.mapped('rated_partner_id.id'), 0) - rating_texts = {10: 'great', 5: 'okay', 1: 'bad'} + # keep 10 for backward compatibility + rating_texts = {10: 'great', 5: 'great', 3: 'okay', 1: 'bad'} for rating in ratings: partner_id = rating.rated_partner_id.id |
