From b1be3262131a2e15bafc37201cff4023e1d2e191 Mon Sep 17 00:00:00 2001 From: niyasraphy <niyasraphyk@gmail.com> Date: Mon, 10 Apr 2023 18:38:32 +0000 Subject: [PATCH] [FIX] gamification: copy False for user karma before this commit, while duplicating an user, karma points is also getting copied to newly created user after this commit, the copying of karma on duplicating an user will be stopped. closes odoo/odoo#118155 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com> --- addons/gamification/models/res_users.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/gamification/models/res_users.py b/addons/gamification/models/res_users.py index 93defb455754..44d6ecca052d 100644 --- a/addons/gamification/models/res_users.py +++ b/addons/gamification/models/res_users.py @@ -7,7 +7,7 @@ from odoo import api, fields, models class Users(models.Model): _inherit = 'res.users' - karma = fields.Integer('Karma', default=0) + karma = fields.Integer('Karma', default=0, copy=False) karma_tracking_ids = fields.One2many('gamification.karma.tracking', 'user_id', string='Karma Changes', groups="base.group_system") 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") -- GitLab