[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) <tde@openerp.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user