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/views/badge.xml | 202 ++++++++++++++ addons/gamification/views/challenge.xml | 230 ++++++++++++++++ addons/gamification/views/gamification.xml | 7 + .../views/gamification_karma_rank_views.xml | 94 +++++++ .../views/gamification_karma_tracking_views.xml | 63 +++++ addons/gamification/views/goal.xml | 300 +++++++++++++++++++++ addons/gamification/views/mail_templates.xml | 55 ++++ addons/gamification/views/res_users_views.xml | 17 ++ 8 files changed, 968 insertions(+) create mode 100644 addons/gamification/views/badge.xml create mode 100644 addons/gamification/views/challenge.xml create mode 100644 addons/gamification/views/gamification.xml create mode 100644 addons/gamification/views/gamification_karma_rank_views.xml create mode 100644 addons/gamification/views/gamification_karma_tracking_views.xml create mode 100644 addons/gamification/views/goal.xml create mode 100644 addons/gamification/views/mail_templates.xml create mode 100644 addons/gamification/views/res_users_views.xml (limited to 'addons/gamification/views') diff --git a/addons/gamification/views/badge.xml b/addons/gamification/views/badge.xml new file mode 100644 index 00000000..522179c3 --- /dev/null +++ b/addons/gamification/views/badge.xml @@ -0,0 +1,202 @@ + + + + gamification.badge.view.search + gamification.badge + + + + + + + + + + + Badges + gamification.badge + kanban,tree,form + + +

+ Create a new badge +

+ A badge is a symbolic token granted to a user as a sign of reward. + It can be deserved automatically when some conditions are met or manually by users. + Some badges are harder than others to get with specific conditions. +

+
+
+ + + + Badge List + gamification.badge + + + + + + + + + + + + + Badge Form + gamification.badge + +
+
+
+ +
+ + +
+
+ + + + +
+ Security rules to define who is allowed to manually grant badges. Not enforced for administrator. +
+ + + + + + + + +
+ + + + + + + + + + + + + + + + + +
+ + + + + Badge Kanban View + gamification.badge + + + + + + + + + + + + + + +
+
+ +
+
+ + + + / + + + /∞ + + +
Can not grant
+
+ granted, + this month +
+
+ +
+ + Owner + +
+
+
+ +
+
+
+
+
+
+
+
+ + + + + + Badge User Kanban View + gamification.badge.user + + + + + + + + + +
+
+
+ +
+
+

+ +

+ +

+
+

Granted by the

+
+
+
+
+
+
+
+
+ diff --git a/addons/gamification/views/challenge.xml b/addons/gamification/views/challenge.xml new file mode 100644 index 00000000..66a4b400 --- /dev/null +++ b/addons/gamification/views/challenge.xml @@ -0,0 +1,230 @@ + + + Challenges List + gamification.challenge + + + + + + + + + + + + gamification.goal + Related Goals + kanban,tree,form + {'search_default_group_by_definition': True, 'search_default_inprogress': True, 'search_default_challenge_id': active_id, 'default_challenge_id': active_id} + +

+ No goal found +

+ There is no goal associated to this challenge matching your search. + Make sure that your challenge is active and assigned to at least one user. +

+
+
+ + + Challenge Form + gamification.challenge + +
+
+
+ + +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Badges are granted when a challenge is finished. This is either at the end of a running period (eg: end of the month for a monthly challenge), at the end date of a challenge (if no periodicity is set) or when the challenge is manually closed.

+
+
+ + + + + +
+

Depending on the Display mode, reports will be individual or shared.

+
+ + + + + +
+ + + + + +
+
+ +
+
+ + +
+
+
+
+ + + Challenge Kanban + gamification.challenge + + + + + + +
+
+ +

+ +
+ + Member + +
+
+
+
+
+
+
+ + + Challenges + gamification.challenge + kanban,tree + {'search_default_inprogress':True, 'default_inprogress':True} + +

+ Create a new challenge +

+ Assign a list of goals to chosen users to evaluate them. + The challenge can use a period (weekly, monthly...) for automatic creation of goals. + The goals are created for the specified users or member of the group. +

+
+
+ + + + kanban + + + + + + form + + + + + + + Challenge line list + gamification.challenge.line + + + + + + + + + + + Challenge Search + gamification.challenge + + + + + + + + + + + + +
diff --git a/addons/gamification/views/gamification.xml b/addons/gamification/views/gamification.xml new file mode 100644 index 00000000..08341ac8 --- /dev/null +++ b/addons/gamification/views/gamification.xml @@ -0,0 +1,7 @@ + + + diff --git a/addons/gamification/views/gamification_karma_rank_views.xml b/addons/gamification/views/gamification_karma_rank_views.xml new file mode 100644 index 00000000..bee0f28f --- /dev/null +++ b/addons/gamification/views/gamification_karma_rank_views.xml @@ -0,0 +1,94 @@ + + + + + + Users + res.users + tree,form + [('rank_id', '=', active_id)] + + + + + Ranks + gamification.karma.rank + tree,form + +

+ Create a new rank +

+ A rank correspond to a fixed karma level. The more you have karma, the more your rank is high. + This is used to quickly know which user is new or old or highly or not active. +

+
+
+ + + gamification.karma.ranks.view.search + gamification.karma.rank + + + + + + + + + + + + gamification.karma.ranks.view.tree + gamification.karma.rank + + + + + + + + + + + gamification.karma.rank.view.form + gamification.karma.rank + +
+ +
+ +
+ +
+
+ + + + + + + + + + + + +
+
+
+
+ + +
+
diff --git a/addons/gamification/views/gamification_karma_tracking_views.xml b/addons/gamification/views/gamification_karma_tracking_views.xml new file mode 100644 index 00000000..998d0ff9 --- /dev/null +++ b/addons/gamification/views/gamification_karma_tracking_views.xml @@ -0,0 +1,63 @@ + + + + gamification.karma.tracking.view.search + gamification.karma.tracking + + + + + + + + + + + + + + gamification.karma.tracking.view.tree + gamification.karma.tracking + + + + + + + + + + + + + gamification.karma.tracking.view.form + gamification.karma.tracking + +
+ + + + + + + + + +
+
+
+ + + Trackings + gamification.karma.tracking + tree,form + + + +
+
diff --git a/addons/gamification/views/goal.xml b/addons/gamification/views/goal.xml new file mode 100644 index 00000000..bfba69b5 --- /dev/null +++ b/addons/gamification/views/goal.xml @@ -0,0 +1,300 @@ + + + + Goals + gamification.goal + tree,form,kanban + {'search_default_group_by_user': True, 'search_default_group_by_definition': True} + +

+ Create a new goal +

+ A goal is defined by a user and a goal definition. + Goals can be created automatically by using challenges. +

+
+
+ + + Goal List + gamification.goal + + + + + + + + + + + + + + + + + Goal Form + gamification.goal + +
+
+
+ + + + + + + + + + + + + + + + + +
+
+
+ + + Goal Search + gamification.goal + + + + + + + + + + + + + + + + + + + + + + + + Goal Kanban View + gamification.goal + + + + + + + + + + + + + + + + + +
    +
  • +
+
+ +
+
+

+
+ +
+ +
+ +
+ + + +
+
+ + + + + +
+ +
+ Target: less than +
+
+ +
+

+ + From + + + To + +

+
+
+
+
+
+
+
+ + + + + + Goal Definitions + gamification.goal.definition + tree,form + +

+ Create a new goal definition +

+ A goal definition is a technical specification of a condition to reach. + The dates, values to reach or users are defined in goal instance. +

+
+
+ + + Goal Definitions List + gamification.goal.definition + + + + + + + + + + + Goal Definitions Form + gamification.goal.definition + +
+ + +
+
+
+ + + Goal Definition Search + gamification.goal.definition + + + + + + + + + + + + + + + + + + + +
diff --git a/addons/gamification/views/mail_templates.xml b/addons/gamification/views/mail_templates.xml new file mode 100644 index 00000000..e8a6a6a3 --- /dev/null +++ b/addons/gamification/views/mail_templates.xml @@ -0,0 +1,55 @@ + + + + + User: New rank reached + + New rank: ${object.rank_id.name} + + ${object.partner_id.id} + +
+ + + + + + + % if user.signature + + + + % endif + +
+

+ Congratulations + ${object.name or ''}! +

+

+ You just reached a new rank : ${object.rank_id.name} +

+ % if object.next_rank_id.name +

Continue your work to become a ${object.next_rank_id.name} !

+ % endif +
+ % set gamification_redirection_data = object.get_gamification_redirection_data() + % for data in gamification_redirection_data + % set url = data['url'] + % set label = data['label'] + ${label} + % endfor +
+
+

+ +

+
+ ${user.signature | safe} +
+
+ ${object.lang} + +
+
+
diff --git a/addons/gamification/views/res_users_views.xml b/addons/gamification/views/res_users_views.xml new file mode 100644 index 00000000..c0c20cad --- /dev/null +++ b/addons/gamification/views/res_users_views.xml @@ -0,0 +1,17 @@ + + + + + + res.users.view.form.inherit.gamification + res.users + + + + + + + + + + -- cgit v1.2.3