From 2abc2ceee005cf03ac0dff240898466b1c439738 Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Wed, 23 Mar 2016 11:17:42 +0100 Subject: [PATCH] [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 --- addons/gamification/models/badge.py | 4 ++-- 1 file 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",