summaryrefslogtreecommitdiff
path: root/addons/gamification/data/goal_base.xml
diff options
context:
space:
mode:
authorMartin Trigaux <mat@openerp.com>2013-12-24 15:45:14 +0100
committerMartin Trigaux <mat@openerp.com>2013-12-24 15:45:14 +0100
commitbe7bc54edc2fcc0abb94450d22f37ae4d4b11dce (patch)
tree6b54c5e5d42e3de27b3d8fedb272df00240c8a2c /addons/gamification/data/goal_base.xml
parent25117ca97f0bc61b27a407f48b97136151fe8303 (diff)
[REF] gamification: use m2o to email.template for report progress, create new field report_template_id, cleaning code
bzr revid: mat@openerp.com-20131224144514-lmbhw88nj7aa3r8i
Diffstat (limited to 'addons/gamification/data/goal_base.xml')
-rw-r--r--addons/gamification/data/goal_base.xml34
1 files changed, 13 insertions, 21 deletions
diff --git a/addons/gamification/data/goal_base.xml b/addons/gamification/data/goal_base.xml
index 5da7b86679d..7c23ae81020 100644
--- a/addons/gamification/data/goal_base.xml
+++ b/addons/gamification/data/goal_base.xml
@@ -122,23 +122,22 @@
<header>
<strong>Reminder ${object.name}</strong>
</header>
-
- <p class="oe_grey">${object.report_header or ''}</p>
<p>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.</p>
<p>If you have not changed your score yet, you can use the button "The current value is up to date" to indicate so.</p>
]]></field>
</record>
-
- <record id="email_template_goal_progress_perso" model="email.template">
- <field name="name">Personal Goal Progress</field>
+
+ <record id="simple_report_template" model="email.template">
+ <field name="name">Simple Challenge Report Progress</field>
<field name="body_html"><![CDATA[
- <header>
- <strong>${object.name}</strong>
- </header>
- <p class="oe_grey">${object.report_header or ''}</p>
+<header>
+ <strong>${object.name}</strong>
+</header>
+<p class="oe_grey">The following message contains the current progress for the challenge ${object.name}</p>
+% if object.visibility_mode == 'personal':
<table width="100%" border="1">
<tr>
<th>Goal</th>
@@ -166,17 +165,8 @@
<td>${line['completeness']} %</td>
</tr>
% endfor
- </table>]]></field>
- </record>
-
- <record id="email_template_goal_progress_group" model="email.template">
- <field name="name">Group Goal Progress</field>
- <field name="body_html"><![CDATA[
- <header>
- <strong>${object.name}</strong>
- </header>
- <p class="oe_grey">${object.report_header or ''}</p>
-
+ </table>
+% else:
% for line in ctx["challenge_lines"]:
<table width="100%" border="1">
<tr>
@@ -209,7 +199,9 @@
<br/><br/>
% endfor
-]]></field>
+% endif
+ ]]></field>
</record>
+
</data>
</openerp>