[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
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user