summaryrefslogtreecommitdiff
path: root/addons/gamification/data
diff options
context:
space:
mode:
authorRobot Odoo <xmo+roboto@odoo.com>2019-08-02 20:36:51 +0200
committerGitHub <noreply@github.com>2019-08-02 20:36:51 +0200
commit6df11fc42d965940e3dcdd64b5a197a60bb6f4e4 (patch)
treeeee38b8192d49fc2c3525b5ce21b80d9d3acc500 /addons/gamification/data
parentec32fd54595614ee8763ba82c5862d79a3e21897 (diff)
parent45e3be94c0095b0814690de3cac9ab56afe32368 (diff)
[MERGE] *: rename image fields and use image.mixin
Merge commit for PR #34925 Related enterprise PR odoo/enterprise/pull/4865 The goal is to: - Use `image.mixin` on the models currently storing multiple image sizes. - Create Image field and use it on models where mixin is overkill. - Rename the image fields to contain the pixel number in the name. - Add 512 size. - Clean up `image.mixin`, zoom field, variant fields. Note: models that currently store only a single size image will not be changed in this PR. Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Diffstat (limited to 'addons/gamification/data')
-rw-r--r--addons/gamification/data/badge.xml10
-rw-r--r--addons/gamification/data/gamification_karma_rank_data.xml10
-rw-r--r--addons/gamification/data/goal_base.xml2
3 files changed, 11 insertions, 11 deletions
diff --git a/addons/gamification/data/badge.xml b/addons/gamification/data/badge.xml
index 06476e98066..696e3fabec7 100644
--- a/addons/gamification/data/badge.xml
+++ b/addons/gamification/data/badge.xml
@@ -5,21 +5,21 @@
<field name="name">Good Job</field>
<field name="description">You did great at your job.</field>
<field name="rule_auth">everyone</field>
- <field name="image" type="base64" file="gamification/static/img/badge_good_job-image.png"/>
+ <field name="image_1920" type="base64" file="gamification/static/img/badge_good_job-image.png"/>
</record>
<record id="badge_problem_solver" model="gamification.badge">
<field name="name">Problem Solver</field>
<field name="description">No one can solve challenges like you do.</field>
<field name="rule_auth">everyone</field>
- <field name="image" type="base64" file="gamification/static/img/badge_problem_solver-image.png"/>
+ <field name="image_1920" type="base64" file="gamification/static/img/badge_problem_solver-image.png"/>
</record>
<record id="badge_hidden" model="gamification.badge">
<field name="name">Hidden</field>
<field name="description">You have found the hidden badge</field>
<field name="rule_auth">nobody</field>
- <field name="image" type="base64" file="gamification/static/img/badge_hidden-image.png"/>
+ <field name="image_1920" type="base64" file="gamification/static/img/badge_hidden-image.png"/>
<field name="active" eval="False" />
</record>
@@ -29,7 +29,7 @@
<field name="rule_auth">everyone</field>
<field name="rule_max">True</field>
<field name="rule_max_number">2</field>
- <field name="image" type="base64" file="gamification/static/img/badge_idea-image.png"/>
+ <field name="image_1920" type="base64" file="gamification/static/img/badge_idea-image.png"/>
</record>
<record id="email_template_badge_received" model="mail.template">
@@ -71,7 +71,7 @@
<table cellspacing="0" cellpadding="0" border="0" style="width: 560px; margin-top: 5px;">
<tbody><tr>
<td valign="center">
- <img src="/web/image/gamification.badge/${object.badge_id.id}/image/80x80" style="padding: 0px; margin: 0px; height: auto; width: 80px;" alt="${user.company_id.name}"/>
+ <img src="/web/image/gamification.badge/${object.badge_id.id}/image_128/80x80" style="padding: 0px; margin: 0px; height: auto; width: 80px;" alt="${user.company_id.name}"/>
</td>
<td valign="center">
<cite>${object.badge_id.description}</cite>
diff --git a/addons/gamification/data/gamification_karma_rank_data.xml b/addons/gamification/data/gamification_karma_rank_data.xml
index 5eba07b1a3d..e0ef1320a4e 100644
--- a/addons/gamification/data/gamification_karma_rank_data.xml
+++ b/addons/gamification/data/gamification_karma_rank_data.xml
@@ -19,7 +19,7 @@
</div>
</field>
<field name="karma_min">1</field>
- <field name="image" type="base64" file="gamification/static/img/rank_newbie_badge.svg"/>
+ <field name="image_1920" type="base64" file="gamification/static/img/rank_newbie_badge.svg"/>
</record>
<record id="rank_student" model="gamification.karma.rank">
@@ -32,7 +32,7 @@
</div>
</field>
<field name="karma_min">100</field>
- <field name="image" type="base64" file="gamification/static/img/rank_student_badge.svg"/>
+ <field name="image_1920" type="base64" file="gamification/static/img/rank_student_badge.svg"/>
</record>
<record id="rank_bachelor" model="gamification.karma.rank">
@@ -45,7 +45,7 @@
</div>
</field>
<field name="karma_min">500</field>
- <field name="image" type="base64" file="gamification/static/img/rank_bachelor_badge.svg"/>
+ <field name="image_1920" type="base64" file="gamification/static/img/rank_bachelor_badge.svg"/>
</record>
<record id="rank_master" model="gamification.karma.rank">
@@ -58,7 +58,7 @@
</div>
</field>
<field name="karma_min">2000</field>
- <field name="image" type="base64" file="gamification/static/img/rank_master_badge.svg"/>
+ <field name="image_1920" type="base64" file="gamification/static/img/rank_master_badge.svg"/>
</record>
<record id="rank_doctor" model="gamification.karma.rank">
@@ -71,6 +71,6 @@
</div>
</field>
<field name="karma_min">10000</field>
- <field name="image" type="base64" file="gamification/static/img/rank_doctor_badge.svg"/>
+ <field name="image_1920" type="base64" file="gamification/static/img/rank_doctor_badge.svg"/>
</record>
</data></odoo>
diff --git a/addons/gamification/data/goal_base.xml b/addons/gamification/data/goal_base.xml
index bb43e81b8f2..a09b588e237 100644
--- a/addons/gamification/data/goal_base.xml
+++ b/addons/gamification/data/goal_base.xml
@@ -145,7 +145,7 @@ Thank you,
<div style="height:${heightA}px;">
${extra_div | safe}
<div style="height:55px;">
- <img style="margin-bottom:5px;width:50px;height:50px;border-radius:50%;" t-att-src="image_data_uri(object.env['res.users'].browse(goal['user_id']).partner_id.image_small)" alt="${goal['name']}"/>
+ <img style="margin-bottom:5px;width:50px;height:50px;border-radius:50%;" t-att-src="image_data_uri(object.env['res.users'].browse(goal['user_id']).partner_id.image_64)" alt="${goal['name']}"/>
</div>
<div align="center" style ="color:${bgColor};height:20px">
${goal['name']}