summaryrefslogtreecommitdiff
path: root/addons/gamification/data/gamification_karma_rank_data.xml
diff options
context:
space:
mode:
authorDavid Beguin <dbe@odoo.com>2019-03-05 12:14:21 +0000
committerThibault Delavallée <tde@odoo.com>2019-03-06 14:08:24 +0000
commit1949c796b522dbb96b3823839742e8727ab670b5 (patch)
tree1ad7297bdfe0975f7efd00c5cc68ce6c90b6d52f /addons/gamification/data/gamification_karma_rank_data.xml
parentc7cceaef793052a98c159822a75ba0abf76d57a4 (diff)
[FIX] gamification, website_profile : re-fix division by zero if user has no karma
If a new user try to access the elearning platform or his porfile, if he has no karma, has it is the case for new users, he won't get any rank. So that the next rank karma minus current rank karma equals zero. To avoid this, next_rank will always be first one existing if the user has no karma. Also, the current rank will not be displayed if the user has no karma. finally, next rank will not be displayed if the user reached the last existing rank. Task ID : 1941250 PR #31512
Diffstat (limited to 'addons/gamification/data/gamification_karma_rank_data.xml')
-rw-r--r--addons/gamification/data/gamification_karma_rank_data.xml6
1 files changed, 6 insertions, 0 deletions
diff --git a/addons/gamification/data/gamification_karma_rank_data.xml b/addons/gamification/data/gamification_karma_rank_data.xml
index 2a5ad0231fe..b83c36327e7 100644
--- a/addons/gamification/data/gamification_karma_rank_data.xml
+++ b/addons/gamification/data/gamification_karma_rank_data.xml
@@ -13,6 +13,12 @@
<record id="rank_newbie" model="gamification.karma.rank">
<field name="name">Newbie</field>
<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 start conquering the world!</div>
+ <img class="ml-3 img img-fluid" style="max-height: 72px;" src="/gamification/static/img/rank_misc_world.png"/>
+ </div>
+ </field>
<field name="karma_min">1</field>
<field name="image" type="base64" file="gamification/static/img/rank_newbie_badge.svg"/>
</record>