From 3751379f1e9a4c215fb6eb898b4ccc67659b9ace Mon Sep 17 00:00:00 2001 From: stephanchrst Date: Tue, 10 May 2022 21:51:50 +0700 Subject: initial commit 2 --- addons/gamification/data/badge.xml | 141 +++++++++ addons/gamification/data/cron.xml | 27 ++ .../data/gamification_karma_rank_data.xml | 76 +++++ .../data/gamification_karma_rank_demo.xml | 39 +++ .../data/gamification_karma_tracking_demo.xml | 116 ++++++++ addons/gamification/data/goal_base.xml | 330 +++++++++++++++++++++ 6 files changed, 729 insertions(+) create mode 100644 addons/gamification/data/badge.xml create mode 100644 addons/gamification/data/cron.xml create mode 100644 addons/gamification/data/gamification_karma_rank_data.xml create mode 100644 addons/gamification/data/gamification_karma_rank_demo.xml create mode 100644 addons/gamification/data/gamification_karma_tracking_demo.xml create mode 100644 addons/gamification/data/goal_base.xml (limited to 'addons/gamification/data') diff --git a/addons/gamification/data/badge.xml b/addons/gamification/data/badge.xml new file mode 100644 index 00000000..fb7c3c6a --- /dev/null +++ b/addons/gamification/data/badge.xml @@ -0,0 +1,141 @@ + + + + + Good Job + You did great at your job. + everyone + + + + + Problem Solver + No one can solve challenges like you do. + everyone + + + + + Hidden + You have found the hidden badge + nobody + + + + + + Brilliant + With your brilliant ideas, you are an inspiration to others. + everyone + True + 2 + + + + + Received Badge + New badge ${object.badge_id.name} granted + + ${object.user_id.partner_id.id} + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+ Your Badge
+ + ${object.badge_id.name} + +
+ ${object.user_id.company_id.name} +
+
+
+
+ + + +
+
+ Congratulations ${object.user_id.name} !
+ You just received badge ${object.badge_id.name} !
+ % if object.badge_id.description + + + + + +
+ ${user.company_id.name} + + ${object.badge_id.description} +
+ % endif +
+ % if object.sender_id + This badge was granted by ${object.sender_id.name}. + % endif +
+ % if object.comment + ${object.comment} + % endif +

+ Thank you, + % if object.sender_id.signature: +
+ ${object.sender_id.signature | safe} + % endif +
+
+
+
+
+ + + +
+ ${object.user_id.company_id.name} +
+ ${object.user_id.company_id.phone} + % if object.user_id.company_id.email + | ${object.user_id.company_id.email} + % endif + % if object.user_id.company_id.website + | + ${object.user_id.company_id.website} + + % endif +
+
+
+ + +
+ Powered by Odoo +
+
+ ${object.user_id.lang} + +
+
+
diff --git a/addons/gamification/data/cron.xml b/addons/gamification/data/cron.xml new file mode 100644 index 00000000..4e592056 --- /dev/null +++ b/addons/gamification/data/cron.xml @@ -0,0 +1,27 @@ + + + + + Gamification: Goal Challenge Check + + code + model._cron_update() + 1 + days + -1 + + + + + Gamification: Karma tracking consolidation + + code + model._consolidate_last_month() + + 1 + months + -1 + + + + diff --git a/addons/gamification/data/gamification_karma_rank_data.xml b/addons/gamification/data/gamification_karma_rank_data.xml new file mode 100644 index 00000000..e0ef1320 --- /dev/null +++ b/addons/gamification/data/gamification_karma_rank_data.xml @@ -0,0 +1,76 @@ + + + + + 2500 + + + 2500 + + + + + Newbie +

You just began the adventure! Welcome!

+ +
+
Earn your first points and join the adventure !
+ +
+
+ 1 + +
+ + + Student +

You're a young padawan now. May the force be with you!

+ +
+
Reach the next rank to show the rest of the world you exist.
+ +
+
+ 100 + +
+ + + Bachelor +

You love learning things. Curiosity is a good way to progress.

+ +
+
Reach the next rank to improve your status!
+ +
+
+ 500 + +
+ + + Master +

You know what you are talking about. People learn from you.

+ +
+
Reach the next rank and become a Master!
+ +
+
+ 2000 + +
+ + + Doctor +

You have reached the last rank. Congratulations!

+ +
+
Reach the next rank and become a powerful user!
+ +
+
+ 10000 + +
+
diff --git a/addons/gamification/data/gamification_karma_rank_demo.xml b/addons/gamification/data/gamification_karma_rank_demo.xml new file mode 100644 index 00000000..848e7fd6 --- /dev/null +++ b/addons/gamification/data/gamification_karma_rank_demo.xml @@ -0,0 +1,39 @@ + + + + + +
+
Reach the next rank and gain a very nice mug !
+ +
+
+
+ + + +
+
Reach the next rank and gain a very magic wand !
+ +
+
+
+ + + +
+
Reach the next rank and gain a very nice hat !
+ +
+
+
+ + + +
+
Reach the next rank and gain a very nice unicorn !
+ +
+
+
+
diff --git a/addons/gamification/data/gamification_karma_tracking_demo.xml b/addons/gamification/data/gamification_karma_tracking_demo.xml new file mode 100644 index 00000000..1b08eca6 --- /dev/null +++ b/addons/gamification/data/gamification_karma_tracking_demo.xml @@ -0,0 +1,116 @@ + + + + + + + 0 + 1000 + + + + + 1000 + 1500 + + + + + 1500 + 2000 + + + + + 2000 + 2050 + + + + + 2050 + 2500 + + + + 2500 + + + + + + + + + 0 + 5 + + + + + 5 + 10 + + + + + 10 + 20 + + + + + 20 + 25 + + + + + 25 + 30 + + + + 30 + + + + + + + + + 0 + 2000 + + + + + 2000 + 2250 + + + + + 2250 + 2500 + + + + + + + + diff --git a/addons/gamification/data/goal_base.xml b/addons/gamification/data/goal_base.xml new file mode 100644 index 00000000..574d3e57 --- /dev/null +++ b/addons/gamification/data/goal_base.xml @@ -0,0 +1,330 @@ + + + + + + + Goal: Reminder for Goal Update + + ${object.user_id.partner_id.id} + +
+ Reminder ${object.name}
+ You have not updated your progress for the goal ${object.definition_id.name} (currently reached at ${object.completeness}%) for at least ${object.remind_update_delay} days. Do not forget to do it. +

+ Thank you, + % if object.challenge_id.manager_id.signature: +
+ ${object.challenge_id.manager_id.signature | safe} + % endif +
+ ${object.user_id.lang} + +
+ + + Challenge: Simple Challenge Report Progress + + + + + + +
+ % set record = ctx.get('record') + % set company = record and record.company_id or user.company_id + % set challenge_lines = ctx.get('challenge_lines', []) + + +
+ + +
+ % if object.visibility_mode == 'ranking': +
+ % endif + + +
+

Leaderboard

+
+ + +
+ % if object.visibility_mode == 'personal': + Here is your current progress in the challenge ${object.name}. + + + + +
+
Personal Performance
+
+ + + + + + + + + + + + + + % for line in challenge_lines: + + + + + + + + + + % endfor + +
GoalsTargetCurrentCompleteness
+ ${line['name']} + % if line['suffix'] or line['monetary']: + (${line['full_suffix']}) + % endif + ${"%.2f" % line['target']} + % if line['suffix']: + ${line['suffix']} + % endif + ${"%.2f" % line['current']} + % if line['suffix']: + ${line['suffix']} + % endif + ${line['completeness']| int}%
+ % else: + + Challenge: ${object.name}. + + % for line in challenge_lines: + + + + + +
+
Top Achievers for goal ${line['name']}
+
+ + % if len(line['goals']) == 2: + + + +
+ + + % set top_goals = line['goals'][:3] + % for goal in top_goals: + + % endfor + +
+ % if loop.index == 1: + % set extra_div = '
' + % set heightA = 95 + % set heightB = 75 + % set bgColor = '#b898b0' + % set fontSize = 50 + % set podiumPosition = '2' + % elif loop.index == 2: + % set extra_div = '' + % set heightA = 55 + % set heightB = 115 + % set bgColor = '#9A6C8E' + % set fontSize = 85 + % set podiumPosition = '1' + % elif loop.index == 3: + % set extra_div = '
' + % set heightA = 115 + % set heightB = 55 + % set bgColor = '#c8afc1' + % set fontSize = 35 + % set podiumPosition = '3' + % endif +
+
+ ${extra_div | safe} +
+ ${goal['name']} +
+
+ ${goal['name']} +
+
+
+ ${podiumPosition | safe} +
+
+ ${"%.2f" % goal['current']} + % if line['suffix'] or line['monetary']: + ${line['full_suffix']} + % endif +
+
+
+
+ % endif + + + + + +
+ + + + + + + + + + + + + + % for goal in line['goals']: + + % set tdBgColor = '#fff' + % set tdColor = 'gray' + % set mutedColor = '#AAAAAA' + % set tdPercentageColor = '#9A6C8E' + + + + + + + + + % endfor + +
RankNamePerformance + % if line['suffix']: + (${line['suffix']}) + % elif line['monetary']: + (${company.currency_id.symbol}) + % endif + Completeness
${goal['rank']+1} + ${goal['name']}${"%.2f" % goal['current']}
on ${"%.2f" % line['target']} +
${goal['completeness'] | int}%
+
+ % endfor + % endif +
+
+
+
+
+ + + + Set your Timezone + Configure your profile and specify your timezone + count + boolean + + [('partner_id.tz', '!=', False)] + + user.id + True + + user.id + + + + Set your Company Data + Write some information about your company (specify at least a name) + count + boolean + + [('user_ids', 'in', [user.id]), ('name', '=', 'YourCompany')] + lower + + user.company_id.id + + + + + + Create User + ir.actions.act_window + res.users + current + + {} + Create and manage users that will connect to the system. Users can be deactivated should there be a period of time during which they will/should not connect to the system. You can assign them groups in order to give them specific access to the applications they need to use in the system. + + + + Invite new Users + Create at least another user + boolean + count + + [('id', '!=', user.id)] + + + + + + Complete your Profile + once + personal + never + + inprogress + other + + + + Setup your Company + once + personal + never + + inprogress + other + + + + + + 1 + + + + + + 1 + + + + + 0 + + + + + 1 + + +
+ +
-- cgit v1.2.3