diff options
| author | Christophe Matthieu <chm@odoo.com> | 2016-03-23 11:17:42 +0100 |
|---|---|---|
| committer | Christophe Matthieu <chm@odoo.com> | 2016-03-23 11:22:51 +0100 |
| commit | 2abc2ceee005cf03ac0dff240898466b1c439738 (patch) | |
| tree | a9cf7539d2089e0a86ff61f8c6519d9b5fb50fcc /addons/gamification/models | |
| parent | 1936367fd2253d8c362b37f92674b434f22e8565 (diff) | |
[IMP] gamification: split multi function field to avoid massive prefetching of user records
Issue: website_forum takes 15 to 30 seconds to load the user page
Diffstat (limited to 'addons/gamification/models')
| -rw-r--r-- | addons/gamification/models/badge.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/gamification/models/badge.py b/addons/gamification/models/badge.py index 69d36def904..5fffc29f488 100644 --- a/addons/gamification/models/badge.py +++ b/addons/gamification/models/badge.py @@ -182,12 +182,12 @@ class gamification_badge(osv.Model): 'stat_count': fields.function(_get_owners_info, string='Total', type="integer", - multi='unique_users', + multi='stat_users', help="The number of time this badge has been received."), 'stat_count_distinct': fields.function(_get_owners_info, type="integer", string='Number of users', - multi='unique_users', + multi='stat_users', help="The number of time this badge has been received by unique users."), 'stat_this_month': fields.function(_get_badge_user_stats, type="integer", |
