c06a7cf2de9e2278780e0a210294c4ed3e053d37
Before this commit, when checking the gained karma per month or per week in /profile/users route, the users gained more karma than they actually have. This is due to the way demo data are loaded : karma tracking history is added but when the final karma is set on the user, a new line of karma tracking is created on the DB (via write or create method). But as the transaction with karma tracking demo data is not commited yet, the old value is still 0. That leads to add a new karma tracking line that have old_value = 0 and new_value = user.karma. At the end the users 'gained' as addition the amount of the karma they have. E.g : Mitchell Admin has 2500 karma and his karma tracking history is the following: 0 -> 1000 then 1000 -> 1500 then 1500 -> 2500. In total, Mitchell should have gained 2500 XP: (2500-1500)+(1500-1000)+(1000-0) But, before this commit, as there is an additional 0 to 2500 karma tracking line, Mitchell Admin gain in total : (2500-0)+(2500-1500)+(1500-1000)+(1000-0) = 5000 karma. This commit clean that additional karma tracking line to get a correct karma tracking history. Task ID: 2209743 PR #48042 closes odoo/odoo#48061 X-original-commit: 858f80e2529b17d1857d77f372c378ae235443de Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
…
…
…
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%