From 6b10864bb906d95b3fa40ff2cee545451d1af4ea Mon Sep 17 00:00:00 2001 From: David Beguin Date: Tue, 23 Jul 2019 12:29:50 +0000 Subject: [PATCH] [IMP] gamification : remove karma_position field Since task Id 2000687 and PR #33475, karma position field is not necessary anymore as the karma position is computed directly in the website_profile controller. Task ID: 2001367 PR #35103 Signed-off-by: Thibault Delavallee (tde) --- addons/gamification/models/res_users.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/addons/gamification/models/res_users.py b/addons/gamification/models/res_users.py index 51a29065156..e262eec4a8e 100644 --- a/addons/gamification/models/res_users.py +++ b/addons/gamification/models/res_users.py @@ -11,7 +11,6 @@ class Users(models.Model): _inherit = 'res.users' karma = fields.Integer('Karma', default=0) - karma_position = fields.Integer('Karma position', compute="_compute_karma_position", store=False) badge_ids = fields.One2many('gamification.badge.user', 'user_id', string='Badges', copy=False) gold_badge = fields.Integer('Gold badges count', compute="_get_user_badge_level") silver_badge = fields.Integer('Silver badges count', compute="_get_user_badge_level") @@ -19,12 +18,6 @@ class Users(models.Model): rank_id = fields.Many2one('gamification.karma.rank', 'Rank', index=False) next_rank_id = fields.Many2one('gamification.karma.rank', 'Next Rank', index=False) - @api.depends('karma') - def _compute_karma_position(self): - _logger.warning("The field karma_position from res.users is deprecated. Don't use it anymore.") - for user in self: - user.karma_position = 0 - @api.depends('badge_ids') def _get_user_badge_level(self): """ Return total badge per level of users