From 122c15c48d430c502adf2df45bad4405a864b5ce Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Tue, 17 Dec 2013 17:15:41 +0100 Subject: [REF] gamification: pretty much changing half of the code to make tde happy... bzr revid: mat@openerp.com-20131217161541-oxsgy7gmko2x6qui --- addons/gamification/data/goal_base.xml | 233 +++++++++++++++++++++++++++++++++ 1 file changed, 233 insertions(+) create mode 100644 addons/gamification/data/goal_base.xml (limited to 'addons/gamification/data/goal_base.xml') diff --git a/addons/gamification/data/goal_base.xml b/addons/gamification/data/goal_base.xml new file mode 100644 index 00000000000..60000ec2805 --- /dev/null +++ b/addons/gamification/data/goal_base.xml @@ -0,0 +1,233 @@ + + + + + + + Set your Timezone + Configure your profile and specify your timezone + count + checkbox + + [('id','=',user.id),('partner_id.tz', '!=', False)] + + user.id + + + + Set your Avatar + In your user preference + manually + checkbox + + + user.id + + + + + Set your Company Data + Write some information about your company (specify at least a name) + count + checkbox + + [('user_ids', 'in', [user.id]), ('name', '=', 'Your Company')] + lower + + user.company_id.id + + + + + + Create User + ir.actions.act_window + res.users + form + current + + {'default_groups_ref': ['base.group_user']} + 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 + checkbox + count + + [('id', '!=', user.id)] + + + + + Mail Group Following + Follow mail groups to receive news + python + self.number_following(cr, uid, 'mail.group') + + + + + + + Complete your Profile + once + progressbar + never + + inprogress + other + + + + Setup your Company + once + progressbar + never + + inprogress + other + + + + + + 1 + + + + + 1 + + + + + + 1 + + + + + 0 + + + + + 1 + + + + + + + + + + Reminder for Goal Update + + Reminder ${object.name} + + +

${object.report_header or ''}

+ +

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.

+ +

If you have not changed your score yet, you can use the button "The current value is up to date" to indicate so.

+ ]]>
+
+ + + Personal Goal Progress + + ${object.name} + +

${object.report_header or ''}

+ + + + + + + + + % for goal in ctx["goals"]: + = 100: + style="font-weight:bold;" + % endif + > + + + + + + % endfor +
GoalTargetCurrentCompleteness
${goal.definition_id.name}${goal.target_goal} + % if goal.definition_suffix: + ${goal.definition_suffix} + % endif + ${goal.current} + % if goal.definition_suffix: + ${goal.definition_suffix} + % endif + ${goal.completeness} %
]]>
+
+ + + Group Goal Progress + + ${object.name} + +

${object.report_header or ''}

+ + % for line in ctx['lines_boards']: + + + + + + + + + + + % for idx, goal in line.board_goals: + % if idx < 3 or goal.user_id.id == user.id: + = 100: + style="font-weight:bold;" + % endif + > + + + + + + % endif + % endfor +
${line.goal_definition.name}
#PersonCompletenessCurrent
${idx+1}${goal.user_id.name}${goal.completeness}%${goal.current}/${goal.target_goal} + % if goal.definition_suffix: + ${goal.definition_suffix} + % endif +
+ +

+ + % endfor +]]>
+
+
+
-- cgit v1.2.3 From 4bc29b9ffae6177dfcc42c69216f29e482c0716e Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Tue, 17 Dec 2013 18:02:32 +0100 Subject: [REF] gamification bzr revid: mat@openerp.com-20131217170232-e0zruxzl1wlycaji --- addons/gamification/data/goal_base.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'addons/gamification/data/goal_base.xml') diff --git a/addons/gamification/data/goal_base.xml b/addons/gamification/data/goal_base.xml index 60000ec2805..8241da8ac3a 100644 --- a/addons/gamification/data/goal_base.xml +++ b/addons/gamification/data/goal_base.xml @@ -81,7 +81,7 @@ Complete your Profile once - progressbar + personal never inprogress @@ -91,7 +91,7 @@ Setup your Company once - progressbar + personal never inprogress -- cgit v1.2.3 From e7887b8b8f892832c5b65b82358d022496a2729d Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Wed, 18 Dec 2013 12:12:43 +0100 Subject: [REF] gamification: python tests and other improvements bzr revid: mat@openerp.com-20131218111243-npnauv6mxhb4nttg --- addons/gamification/data/goal_base.xml | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'addons/gamification/data/goal_base.xml') diff --git a/addons/gamification/data/goal_base.xml b/addons/gamification/data/goal_base.xml index 8241da8ac3a..2b21fbc947f 100644 --- a/addons/gamification/data/goal_base.xml +++ b/addons/gamification/data/goal_base.xml @@ -14,17 +14,6 @@ user.id - - Set your Avatar - In your user preference - manually - checkbox - - - user.id - - - Set your Company Data Write some information about your company (specify at least a name) @@ -104,11 +93,6 @@ 1 - - - 1 - - -- cgit v1.2.3 From f77aefc07ace66587bc13f7d2fa55755968437c5 Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Fri, 20 Dec 2013 15:45:21 +0100 Subject: [REF] gamification: cleaning methods and reports bzr revid: mat@openerp.com-20131220144521-wyu1gx8bcitu6nk4 --- addons/gamification/data/goal_base.xml | 64 ++++++++++++++++------------------ 1 file changed, 31 insertions(+), 33 deletions(-) (limited to 'addons/gamification/data/goal_base.xml') diff --git a/addons/gamification/data/goal_base.xml b/addons/gamification/data/goal_base.xml index 2b21fbc947f..48dd770bbcc 100644 --- a/addons/gamification/data/goal_base.xml +++ b/addons/gamification/data/goal_base.xml @@ -7,7 +7,7 @@ Set your Timezone Configure your profile and specify your timezone count - checkbox + boolean [('id','=',user.id),('partner_id.tz', '!=', False)] @@ -18,7 +18,7 @@ Set your Company Data Write some information about your company (specify at least a name) count - checkbox + boolean [('user_ids', 'in', [user.id]), ('name', '=', 'Your Company')] lower @@ -29,7 +29,7 @@ - - - Personal Goal Progress + + + Simple Challenge Report Progress - ${object.name} - -

${object.report_header or ''}

+
+ ${object.name} +
+

The following message contains the current progress for the challenge ${object.name}

+% if object.visibility_mode == 'personal': @@ -166,17 +165,8 @@ % endfor -
Goal${line['completeness']} %
]]>
-
- - - Group Goal Progress - - ${object.name} - -

${object.report_header or ''}

- + +% else: % for line in ctx["challenge_lines"]: @@ -209,7 +199,9 @@

% endfor -]]> +% endif + ]]> + -- cgit v1.2.3 From 58994713d8ec0b92da02e7d722c8a843a6c21501 Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Tue, 24 Dec 2013 16:05:49 +0100 Subject: [FIX] gamification: move template block before challenge declaration bzr revid: mat@openerp.com-20131224150549-uafyr7lyva3u9k8n --- addons/gamification/data/goal_base.xml | 187 +++++++++++++++++---------------- 1 file changed, 94 insertions(+), 93 deletions(-) (limited to 'addons/gamification/data/goal_base.xml') diff --git a/addons/gamification/data/goal_base.xml b/addons/gamification/data/goal_base.xml index 7c23ae81020..66dd7be7431 100644 --- a/addons/gamification/data/goal_base.xml +++ b/addons/gamification/data/goal_base.xml @@ -1,5 +1,99 @@ + + + + + + Reminder for Goal Update + + 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.

+ +

If you have not changed your score yet, you can use the button "The current value is up to date" to indicate so.

+ ]]>
+
+ + + Simple Challenge Report Progress + + ${object.name} + +

The following message contains the current progress for the challenge ${object.name}

+ +% if object.visibility_mode == 'personal': +
+ + + + + + + % for line in ctx["challenge_lines"]: + = 100: + style="font-weight:bold;" + % endif + > + + + + + + % endfor +
GoalTargetCurrentCompleteness
${line['name']}${line['target']} + % if line['suffix']: + ${line['suffix']} + % endif + ${line['current']} + % if line['suffix']: + ${line['suffix']} + % endif + ${line['completeness']} %
+% else: + % for line in ctx["challenge_lines"]: + + + + + + + + + + + % for goal in line['goals']: + = 100: + style="font-weight:bold;" + % endif + > + + + + + + % endfor +
${line['name']}
#PersonCompletenessCurrent
${goal['rank']}${goal['name']}${goal['completeness']}%${goal['current']}/${line['target']} + % if line['suffix']: + ${line['suffix']} + % endif +
+ +

+ + % endfor +% endif + ]]>
+
+ + + @@ -111,97 +205,4 @@
- - - - - - Reminder for Goal Update - - 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.

- -

If you have not changed your score yet, you can use the button "The current value is up to date" to indicate so.

- ]]>
-
- - - Simple Challenge Report Progress - - ${object.name} - -

The following message contains the current progress for the challenge ${object.name}

- -% if object.visibility_mode == 'personal': - - - - - - - - % for line in ctx["challenge_lines"]: - = 100: - style="font-weight:bold;" - % endif - > - - - - - - % endfor -
GoalTargetCurrentCompleteness
${line['name']}${line['target']} - % if line['suffix']: - ${line['suffix']} - % endif - ${line['current']} - % if line['suffix']: - ${line['suffix']} - % endif - ${line['completeness']} %
-% else: - % for line in ctx["challenge_lines"]: - - - - - - - - - - - % for goal in line['goals']: - = 100: - style="font-weight:bold;" - % endif - > - - - - - - % endfor -
${line['name']}
#PersonCompletenessCurrent
${goal['rank']}${goal['name']}${goal['completeness']}%${goal['current']}/${line['target']} - % if line['suffix']: - ${line['suffix']} - % endif -
- -

- - % endfor -% endif - ]]>
-
- -
-- cgit v1.2.3