summaryrefslogtreecommitdiff
path: root/addons/gamification/data
diff options
context:
space:
mode:
authorThibault Delavallée <tde@odoo.com>2019-06-18 14:08:02 +0000
committerThibault Delavallée <tde@odoo.com>2019-06-28 13:45:33 +0000
commitcd039b64d46b01a293ad496bd07ba28fd8e53d95 (patch)
tree218bbfa871e1d1abb3621b04d5febeac88e4e1dc /addons/gamification/data
parentd5f8e39923de39c3a5b7daa39ea29f71178fe56f (diff)
[FIX] gamification, website_{profile, slides}: correctly display next rank
This fix correctly displayed motivational of next rank to achieve depending on current karma. Indeed description_motivational field is not the motivational to reach next rank but to reach the current rank, taken from previous rank point of view. That way a given rank is configured by modifying only 1 data. When not having any karma points (newly created user) the next rank is computed as being the first available rank. Motivational phrases and badges are updated accordingly. This commit partially reverts 489c8623e2c4869ce1ed8be3d186e36cc1c47456. Result * new user with no karma: next rank is the first rank; * user with karma and next rank: as currently; * user being at final rank: next rank is just current rank with a 100% circle; Linked to task 2005840 Related to PR #34220
Diffstat (limited to 'addons/gamification/data')
-rw-r--r--addons/gamification/data/gamification_karma_rank_data.xml19
-rw-r--r--addons/gamification/data/gamification_karma_rank_demo.xml4
2 files changed, 12 insertions, 11 deletions
diff --git a/addons/gamification/data/gamification_karma_rank_data.xml b/addons/gamification/data/gamification_karma_rank_data.xml
index f86b827cceb..5eba07b1a3d 100644
--- a/addons/gamification/data/gamification_karma_rank_data.xml
+++ b/addons/gamification/data/gamification_karma_rank_data.xml
@@ -14,8 +14,8 @@
<field name="description" type="html"><p>You just began the adventure! Welcome!</p></field>
<field name="description_motivational" type="html">
<div class="media align-items-center">
- <div class="media-body">Reach the next rank to show the rest of the world you exist!</div>
- <img class="ml-3 img img-fluid" style="max-height: 72px;" src="/gamification/static/img/rank_student_badge.svg"/>
+ <div class="media-body">Earn your first points and join the adventure !</div>
+ <img class="ml-3 img img-fluid" style="max-height: 72px;" src="/gamification/static/img/rank_newbie_badge.svg"/>
</div>
</field>
<field name="karma_min">1</field>
@@ -27,8 +27,8 @@
<field name="description" type="html"><p>You're a young padawan now. May the force be with you!</p></field>
<field name="description_motivational" type="html">
<div class="media align-items-center">
- <div class="media-body">Reach the next rank to improve your status.</div>
- <img class="ml-3 img img-fluid" style="max-height: 72px;" src="/gamification/static/img/rank_bachelor_badge.svg"/>
+ <div class="media-body">Reach the next rank to show the rest of the world you exist.</div>
+ <img class="ml-3 img img-fluid" style="max-height: 72px;" src="/gamification/static/img/rank_student_badge.svg"/>
</div>
</field>
<field name="karma_min">100</field>
@@ -40,8 +40,8 @@
<field name="description" type="html"><p>You love learning things. Curiosity is a good way to progress.</p></field>
<field name="description_motivational" type="html">
<div class="media align-items-center">
- <div class="media-body">Reach the next rank and become a Master!</div>
- <img class="ml-3 img img-fluid" style="max-height: 72px;" src="/gamification/static/img/rank_master_badge.svg"/>
+ <div class="media-body">Reach the next rank to improve your status!</div>
+ <img class="ml-3 img img-fluid" style="max-height: 72px;" src="/gamification/static/img/rank_bachelor_badge.svg"/>
</div>
</field>
<field name="karma_min">500</field>
@@ -53,8 +53,8 @@
<field name="description" type="html"><p>You know what you are talking about. People learn from you.</p></field>
<field name="description_motivational" type="html">
<div class="media align-items-center">
- <div class="media-body">Reach the next rank and become a powerful user!</div>
- <img class="ml-3 img img-fluid" style="max-height: 72px;" src="/gamification/static/img/rank_doctor_badge.svg"/>
+ <div class="media-body">Reach the next rank and become a Master!</div>
+ <img class="ml-3 img img-fluid" style="max-height: 72px;" src="/gamification/static/img/rank_master_badge.svg"/>
</div>
</field>
<field name="karma_min">2000</field>
@@ -66,7 +66,8 @@
<field name="description" type="html"><p>You have reached the last rank. Congratulations!</p></field>
<field name="description_motivational" type="html">
<div class="media align-items-center">
- <div class="media-body">You have reached the last rank. Congratulations!</div>
+ <div class="media-body">Reach the next rank and become a powerful user!</div>
+ <img class="ml-3 img img-fluid" style="max-height: 72px;" src="/gamification/static/img/rank_doctor_badge.svg"/>
</div>
</field>
<field name="karma_min">10000</field>
diff --git a/addons/gamification/data/gamification_karma_rank_demo.xml b/addons/gamification/data/gamification_karma_rank_demo.xml
index 6250ee227f6..839e8750047 100644
--- a/addons/gamification/data/gamification_karma_rank_demo.xml
+++ b/addons/gamification/data/gamification_karma_rank_demo.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<odoo><data noupdate="0">
+<odoo><data noupdate="1">
<!-- Set demo karma for test tour as demo user-->
<record id="base.user_demo" model="res.users">
<field name="karma">20</field>
@@ -39,7 +39,7 @@
<record id="rank_doctor" model="gamification.karma.rank">
<field name="description_motivational" type="html">
<div class="media align-items-center">
- <div class="media-body">You have reached the last rank. Congratulations!</div>
+ <div class="media-body">Reach the next rank and gain a very nice unicorn !</div>
<img class="ml-3 img img-fluid" style="max-height: 72px;" src="/gamification/static/img/rank_misc_unicorn.png"/>
</div>
</field>