summaryrefslogtreecommitdiff
path: root/addons/gamification/data
diff options
context:
space:
mode:
authorDavid Beguin <dbe@odoo.com>2019-03-07 16:01:23 +0000
committerThibault Delavallée <tde@odoo.com>2019-03-08 11:15:07 +0000
commit523c1276a13bc63c79e499286d3883ee3cbd953d (patch)
tree33c2392b2bd734b70f57b87cc19aa081f8db0373 /addons/gamification/data
parentf38a81f9812b99b7fb95e2b0eca7b1252401972f (diff)
[IMP] gamification : move rank demo data into data
In order to se the 'next rank card' and the user karma on user's profile page, not only the first rank is needed but also higher ranks. Otherwise everyone will be 'Newbie', even the admin. Moreover it is easier to update existing data for things like rank than having to figure out how it works. Task ID : 1941250 PR #31697
Diffstat (limited to 'addons/gamification/data')
-rw-r--r--addons/gamification/data/gamification_karma_rank_data.xml97
-rw-r--r--addons/gamification/data/gamification_karma_rank_demo.xml52
2 files changed, 93 insertions, 56 deletions
diff --git a/addons/gamification/data/gamification_karma_rank_data.xml b/addons/gamification/data/gamification_karma_rank_data.xml
index b83c36327e7..3833dd24b7e 100644
--- a/addons/gamification/data/gamification_karma_rank_data.xml
+++ b/addons/gamification/data/gamification_karma_rank_data.xml
@@ -1,26 +1,75 @@
<?xml version="1.0" encoding="utf-8"?>
-<odoo>
- <data noupdate="1">
- <!--Karma-->
- <record id="base.user_root" model="res.users">
- <field name="karma">2500</field>
- </record>
- <record id="base.user_admin" model="res.users">
- <field name="karma">2500</field>
- </record>
+<odoo><data noupdate="1">
+ <!--Karma-->
+ <record id="base.user_root" model="res.users">
+ <field name="karma">2500</field>
+ </record>
+ <record id="base.user_admin" model="res.users">
+ <field name="karma">2500</field>
+ </record>
- <!--Ranks-->
- <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>
- </data>
-</odoo> \ No newline at end of file
+ <!--Ranks-->
+ <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 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">1</field>
+ <field name="image" type="base64" file="gamification/static/img/rank_newbie_badge.svg"/>
+ </record>
+
+ <record id="rank_student" model="gamification.karma.rank">
+ <field name="name">Student</field>
+ <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>
+ </field>
+ <field name="karma_min">100</field>
+ <field name="image" type="base64" file="gamification/static/img/rank_student_badge.svg"/>
+ </record>
+
+ <record id="rank_bachelor" model="gamification.karma.rank">
+ <field name="name">Bachelor</field>
+ <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>
+ </field>
+ <field name="karma_min">500</field>
+ <field name="image" type="base64" file="gamification/static/img/rank_bachelor_badge.svg"/>
+ </record>
+
+ <record id="rank_master" model="gamification.karma.rank">
+ <field name="name">Master</field>
+ <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>
+ </field>
+ <field name="karma_min">2000</field>
+ <field name="image" type="base64" file="gamification/static/img/rank_master_badge.svg"/>
+ </record>
+
+ <record id="rank_doctor" model="gamification.karma.rank">
+ <field name="name">Doctor</field>
+ <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>
+ </field>
+ <field name="karma_min">10000</field>
+ <field name="image" type="base64" file="gamification/static/img/rank_doctor_badge.svg"/>
+ </record>
+</data></odoo>
diff --git a/addons/gamification/data/gamification_karma_rank_demo.xml b/addons/gamification/data/gamification_karma_rank_demo.xml
index 26c639a8cc9..c2d81ebbcc7 100644
--- a/addons/gamification/data/gamification_karma_rank_demo.xml
+++ b/addons/gamification/data/gamification_karma_rank_demo.xml
@@ -10,51 +10,39 @@
<!--Ranks-->
<record id="rank_student" model="gamification.karma.rank">
- <field name="name">Student</field>
- <field name="description" type="html"><p>You begin to understand things ! Keep going!</p></field>
<field name="description_motivational" type="html">
-<div class="media align-items-center">
- <div class="media-body">Reach the next rank and gain a very nice mug !</div>
- <img class="ml-3 img img-fluid" style="max-height: 72px;" src="/gamification/static/img/rank_misc_mug.png"/>
-</div></field>
- <field name="karma_min">100</field>
- <field name="image" type="base64" file="gamification/static/img/rank_student_badge.svg"/>
+ <div class="media align-items-center">
+ <div class="media-body">Reach the next rank and gain a very nice mug !</div>
+ <img class="ml-3 img img-fluid" style="max-height: 72px;" src="/gamification/static/img/rank_misc_mug.png"/>
+ </div>
+ </field>
</record>
<record id="rank_bachelor" model="gamification.karma.rank">
- <field name="name">Bachelor</field>
- <field name="description" type="html"><p>Hey ! You're not so dumb after all !</p></field>
<field name="description_motivational" type="html">
-<div class="media align-items-center">
- <div class="media-body">Reach the next rank and gain a very magic wand !</div>
- <img class="ml-3 img img-fluid" style="max-height: 72px;" src="/gamification/static/img/rank_misc_wand.png"/>
-</div></field>
- <field name="karma_min">500</field>
- <field name="image" type="base64" file="gamification/static/img/rank_bachelor_badge.svg"/>
+ <div class="media align-items-center">
+ <div class="media-body">Reach the next rank and gain a very magic wand !</div>
+ <img class="ml-3 img img-fluid" style="max-height: 72px;" src="/gamification/static/img/rank_misc_wand.png"/>
+ </div>
+ </field>
</record>
<record id="rank_master" model="gamification.karma.rank">
- <field name="name">Master</field>
- <field name="description" type="html"><p>You're good ! Really Good !</p></field>
<field name="description_motivational" type="html">
-<div class="media align-items-center">
- <div class="media-body">Reach the next rank and gain a very nice hat !</div>
- <img class="ml-3 img img-fluid" style="max-height: 72px;" src="/gamification/static/img/rank_misc_hat.png"/>
-</div></field>
- <field name="karma_min">2000</field>
- <field name="image" type="base64" file="gamification/static/img/rank_master_badge.svg"/>
+ <div class="media align-items-center">
+ <div class="media-body">Reach the next rank and gain a very nice hat !</div>
+ <img class="ml-3 img img-fluid" style="max-height: 72px;" src="/gamification/static/img/rank_misc_hat.png"/>
+ </div>
+ </field>
</record>
<record id="rank_doctor" model="gamification.karma.rank">
- <field name="name">Doctor</field>
- <field name="description" type="html"><p>Ok, RESPECT !</p></field>
<field name="description_motivational" type="html">
-<div class="media align-items-center">
- <div class="media-body">Reach the next rank and gain a week-end with a unicorn !</div>
- <img class="ml-3 img img-fluid" style="max-height: 72px;" src="/gamification/static/img/rank_misc_unicorn.png"/>
-</div></field>
- <field name="karma_min">10000</field>
- <field name="image" type="base64" file="gamification/static/img/rank_doctor_badge.svg"/>
+ <div class="media align-items-center">
+ <div class="media-body">Reach the next rank and gain a week-end with a unicorn !</div>
+ <img class="ml-3 img img-fluid" style="max-height: 72px;" src="/gamification/static/img/rank_misc_unicorn.png"/>
+ </div>
+ </field>
</record>
</data></odoo>