diff options
| author | David Beguin <dbe@odoo.com> | 2019-10-18 15:17:41 +0000 |
|---|---|---|
| committer | Thibault Delavallée <tde@odoo.com> | 2019-11-22 14:44:39 +0000 |
| commit | 6f0d36fa67c91d0bd70cf092bd1d41c615e1e8be (patch) | |
| tree | 8f92e2db08d551021a2003908dc111b4411d67c9 /addons/website_profile/controllers/main.py | |
| parent | e85faf398659a5beb0b1570a06af64dcf78dc1c8 (diff) | |
[REF] gamification : rename stat_* fields into granted_* to ease understanding
In this commit we rename stat_count into granted_count, and stat_count_distinct
into granted_users_count to reflect more what are those variables, aka count
of granted badges.
Task ID: 1961053
PR #32594
Diffstat (limited to 'addons/website_profile/controllers/main.py')
| -rw-r--r-- | addons/website_profile/controllers/main.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/website_profile/controllers/main.py b/addons/website_profile/controllers/main.py index 2148f5b78a2..858efd34f16 100644 --- a/addons/website_profile/controllers/main.py +++ b/addons/website_profile/controllers/main.py @@ -180,7 +180,7 @@ class WebsiteProfile(http.Controller): Badge = request.env['gamification.badge'] badges = Badge.sudo().search(self._prepare_badges_domain(**kwargs)) - badges = sorted(badges, key=lambda b: b.stat_count_distinct, reverse=True) + badges = sorted(badges, key=lambda b: b.granted_users_count, reverse=True) values = self._prepare_user_values(searches={'badges': True}) values.update({ |
