summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorSébastien Theys <seb@odoo.com>2019-09-19 10:23:39 +0000
committerSébastien Theys <seb@odoo.com>2019-09-19 10:23:39 +0000
commitb6288e54461426d7aac6cfc549cee3e90309a093 (patch)
treeaabd9103c4e0529844b21a01a4c2cada94f05bbb /addons
parente3d2b018c2cbd8642d8eb15d8d3655263dda8c2d (diff)
[IMP] *: remove image_64 and clean views
There are too many image sizes. Since they are stored resized this takes time to generate when saving a new image, it's more rows on the attachment table, more files on the disk, ... 64px is close enough to 128px that it can be removed without a big impact on download size. It will even reduce download and number of requests when both images are displayed because now only one has to be downloaded and then benefit from cache. The difference between the two is typically around 1.5kB which is negligible these days, especially when the request overhead is around 0.5kB already, not even taking into account other factors such as latency. If a 64px image must absolutely be returned, it is still possible to pass the size parameters to the image route. But the current guideline is to handle resizing in the views when necessary. Views ===== - remove width and height attributes when existing CSS rules are overriding them (eg. `.oe_kanban_avatar` in the right context) - add CSS rules instead of width and height attributes when possible - use `object-fit: cover;` where width and height are forced to avoid distortion of non-square images - for products, use `object-fit: contain;` instead, keep ratio but without crop - add new CSS rules where the expected size was max 64px*64px before due to the image size itself - remove `img-fluid` where using size classes to avoid conflicting rules task-2060865 closes odoo/odoo#36147 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Diffstat (limited to 'addons')
-rw-r--r--addons/account/views/account_move_views.xml2
-rw-r--r--addons/account_analytic_default/views/account_analytic_default_view.xml2
-rw-r--r--addons/calendar/views/calendar_views.xml2
-rw-r--r--addons/crm/views/crm_lead_views.xml8
-rw-r--r--addons/event/views/event_views.xml2
-rw-r--r--addons/fleet/views/fleet_vehicle_cost_views.xml2
-rw-r--r--addons/gamification/data/goal_base.xml2
-rw-r--r--addons/gamification/static/src/scss/gamification.scss1
-rw-r--r--addons/gamification/views/badge.xml2
-rw-r--r--addons/gamification/views/challenge.xml2
-rw-r--r--addons/gamification/views/goal.xml2
-rw-r--r--addons/hr/models/hr_employee_public.py2
-rw-r--r--addons/hr/static/src/scss/hr.scss6
-rw-r--r--addons/hr/views/hr_employee_public_views.xml5
-rw-r--r--addons/hr/views/hr_employee_views.xml7
-rw-r--r--addons/hr_attendance/views/hr_attendance_view.xml2
-rw-r--r--addons/hr_expense/views/hr_expense_views.xml4
-rw-r--r--addons/hr_holidays/report/hr_leave_reports.xml2
-rw-r--r--addons/hr_holidays/views/hr_leave_allocation_views.xml7
-rw-r--r--addons/hr_holidays/views/hr_leave_views.xml7
-rw-r--r--addons/hr_maintenance/views/maintenance_views.xml2
-rw-r--r--addons/hr_recruitment/data/hr_recruitment_data.xml4
-rw-r--r--addons/hr_recruitment/views/hr_recruitment_views.xml2
-rw-r--r--addons/hr_timesheet/views/hr_timesheet_views.xml2
-rw-r--r--addons/hr_work_entry/views/hr_work_entry_views.xml2
-rw-r--r--addons/im_livechat/data/mail_data.xml4
-rw-r--r--addons/im_livechat/views/mail_channel_views.xml4
-rw-r--r--addons/lunch/controllers/main.py2
-rw-r--r--addons/lunch/report/lunch_cashmove_report_views.xml2
-rw-r--r--addons/lunch/static/src/xml/lunch_kanban.xml2
-rw-r--r--addons/lunch/views/lunch_cashmove_views.xml2
-rw-r--r--addons/lunch/views/lunch_orders_views.xml2
-rw-r--r--addons/mail/models/mail_message.py2
-rw-r--r--addons/mail/static/src/js/composers/basic_composer.js2
-rw-r--r--addons/mail/static/src/js/followers.js4
-rw-r--r--addons/mail/static/src/js/models/messages/message.js2
-rw-r--r--addons/mail/static/src/js/models/threads/dm_chat.js2
-rw-r--r--addons/mail/static/src/scss/discuss.scss1
-rw-r--r--addons/mail/static/src/scss/followers.scss2
-rw-r--r--addons/mail/static/src/scss/mail_activity.scss2
-rw-r--r--addons/mail/static/src/scss/systray.scss1
-rw-r--r--addons/mail/static/src/scss/thread.scss4
-rw-r--r--addons/mail/static/src/xml/activity.xml8
-rw-r--r--addons/mail/static/src/xml/composer.xml2
-rw-r--r--addons/mail/static/src/xml/followers.xml2
-rw-r--r--addons/mail/views/mail_activity_views.xml2
-rw-r--r--addons/mail/views/mail_message_views.xml2
-rw-r--r--addons/mail/views/res_partner_views.xml2
-rw-r--r--addons/maintenance/views/maintenance_views.xml6
-rw-r--r--addons/mass_mailing/views/mailing_mailing_views.xml2
-rw-r--r--addons/mrp/views/ir_attachment_view.xml2
-rw-r--r--addons/mrp/views/mrp_production_views.xml2
-rw-r--r--addons/mrp/views/mrp_workorder_views.xml2
-rw-r--r--addons/note/views/note_views.xml2
-rw-r--r--addons/point_of_sale/static/src/js/screens.js2
-rw-r--r--addons/point_of_sale/static/src/xml/pos.xml4
-rw-r--r--addons/point_of_sale/views/point_of_sale_dashboard.xml6
-rw-r--r--addons/point_of_sale/views/pos_session_view.xml2
-rw-r--r--addons/portal/static/src/scss/portal.scss1
-rw-r--r--addons/portal/static/src/xml/portal_chatter.xml2
-rw-r--r--addons/product/models/product.py7
-rw-r--r--addons/product/models/product_template.py1
-rw-r--r--addons/product/views/product_template_views.xml4
-rw-r--r--addons/product/views/product_views.xml4
-rw-r--r--addons/project/views/project_views.xml8
-rw-r--r--addons/purchase/views/portal_templates.xml2
-rw-r--r--addons/purchase_requisition/views/purchase_requisition_views.xml2
-rw-r--r--addons/resource/views/resource_views.xml2
-rw-r--r--addons/sale/data/mail_data.xml2
-rw-r--r--addons/sale/views/sale_views.xml2
-rw-r--r--addons/sales_team/views/crm_team_views.xml2
-rw-r--r--addons/stock_picking_batch/views/stock_picking_batch_views.xml2
-rw-r--r--addons/web/controllers/main.py2
-rw-r--r--addons/web/static/src/js/chrome/user_menu.js2
-rw-r--r--addons/web/static/src/js/fields/relational_fields.js2
-rw-r--r--addons/web/static/src/js/views/calendar/calendar_view.js2
-rw-r--r--addons/web/static/src/scss/fields.scss1
-rw-r--r--addons/web/static/src/scss/kanban_view.scss1
-rw-r--r--addons/web/static/src/scss/ui.scss38
-rw-r--r--addons/web/static/tests/fields/relational_fields_tests.js2
-rw-r--r--addons/web/tests/test_image.py13
-rw-r--r--addons/website_blog/models/website_blog.py2
-rw-r--r--addons/website_blog/static/src/scss/website_blog.scss4
-rw-r--r--addons/website_blog/views/website_blog_views.xml2
-rw-r--r--addons/website_event_track/views/event_track_views.xml8
-rw-r--r--addons/website_hr_recruitment/views/website_hr_recruitment_templates.xml2
-rw-r--r--addons/website_livechat/static/src/xml/thread.xml2
-rw-r--r--addons/website_livechat/views/website_livechat.xml13
-rw-r--r--addons/website_mail_channel/static/src/css/website_mail_channel.css5
-rw-r--r--addons/website_mail_channel/views/website_mail_channel_templates.xml6
-rw-r--r--addons/website_membership/views/website_membership_templates.xml4
-rw-r--r--addons/website_profile/controllers/main.py2
-rw-r--r--addons/website_profile/views/website_profile.xml8
-rw-r--r--addons/website_rating/static/src/js/portal_chatter.js4
-rw-r--r--addons/website_sale/data/mail_template_data.xml2
-rw-r--r--addons/website_sale/static/src/scss/website_sale_frontend.scss5
-rw-r--r--addons/website_sale/static/src/xml/website_sale_utils.xml4
-rw-r--r--addons/website_sale/tests/test_website_sale_image.py11
-rw-r--r--addons/website_sale/views/templates.xml16
-rw-r--r--addons/website_sale_comparison/static/src/scss/website_sale_comparison.scss8
-rw-r--r--addons/website_sale_comparison/static/tests/tours/website_sale_comparison.js8
-rw-r--r--addons/website_sale_comparison/views/website_sale_comparison_template.xml59
-rw-r--r--addons/website_sale_coupon/views/website_sale_templates.xml8
-rw-r--r--addons/website_slides/controllers/main.py2
-rw-r--r--addons/website_slides/views/slide_slide_views.xml6
-rw-r--r--addons/website_slides/views/website_slides_templates_homepage.xml2
106 files changed, 241 insertions, 225 deletions
diff --git a/addons/account/views/account_move_views.xml b/addons/account/views/account_move_views.xml
index 4efb5f90b6e..0c4475e328d 100644
--- a/addons/account/views/account_move_views.xml
+++ b/addons/account/views/account_move_views.xml
@@ -106,7 +106,7 @@
<span t-esc="record.name.value"/>
</div>
<div class="col-2 text-right">
- <img t-att-src="kanban_image('res.partner', 'image_64', record.partner_id.raw_value)" t-att-title="record.partner_id.value" t-att-alt="record.partner_id.value" width="24" height="24" class="oe_kanban_avatar"/>
+ <img t-att-src="kanban_image('res.partner', 'image_128', record.partner_id.raw_value)" t-att-title="record.partner_id.value" t-att-alt="record.partner_id.value" class="oe_kanban_avatar o_image_24_cover"/>
</div>
</div>
</div>
diff --git a/addons/account_analytic_default/views/account_analytic_default_view.xml b/addons/account_analytic_default/views/account_analytic_default_view.xml
index ab568e3cd96..805ec5250ca 100644
--- a/addons/account_analytic_default/views/account_analytic_default_view.xml
+++ b/addons/account_analytic_default/views/account_analytic_default_view.xml
@@ -59,7 +59,7 @@
<div t-attf-class="oe_kanban_card oe_kanban_global_click">
<div>
<strong><span><field name="analytic_id"/></span></strong>
- <img t-att-src="kanban_image('res.users', 'image_64', record.user_id.raw_value)" t-att-title="record.user_id.value" t-att-alt="record.user_id.value" width="24" height="24" class="oe_kanban_avatar float-right"/>
+ <img t-att-src="kanban_image('res.users', 'image_128', record.user_id.raw_value)" t-att-title="record.user_id.value" t-att-alt="record.user_id.value" class="oe_kanban_avatar o_image_24_cover float-right"/>
</div>
<div t-if="record.date_start.value"><i class="fa fa-calendar"></i> From <field name="date_start"/> <t t-if="record.date_stop.value">to <field name="date_stop"/></t></div>
<div t-if="record.product_id.value"><strong>Product</strong> <field name="product_id"/> </div>
diff --git a/addons/calendar/views/calendar_views.xml b/addons/calendar/views/calendar_views.xml
index b00fd2358c4..896e6948cb9 100644
--- a/addons/calendar/views/calendar_views.xml
+++ b/addons/calendar/views/calendar_views.xml
@@ -262,7 +262,7 @@
color="partner_id">
<field name="attendee_status"/>
<field name="partner_id"/>
- <field name="partner_ids" widget="many2many_tags_avatar" write_model="calendar.contacts" write_field="partner_id" avatar_field="image_64"/>
+ <field name="partner_ids" widget="many2many_tags_avatar" write_model="calendar.contacts" write_field="partner_id" avatar_field="image_128"/>
<field name="description"/>
</calendar>
</field>
diff --git a/addons/crm/views/crm_lead_views.xml b/addons/crm/views/crm_lead_views.xml
index cb371c753fa..efc14b3b7e7 100644
--- a/addons/crm/views/crm_lead_views.xml
+++ b/addons/crm/views/crm_lead_views.xml
@@ -384,7 +384,7 @@
</div>
</div>
<div class="oe_kanban_bottom_right">
- <img t-att-src="kanban_image('res.users', 'image_64', record.user_id.raw_value)" t-att-title="record.user_id.value" t-att-alt="record.user_id.value" width="24" height="24" class="oe_kanban_avatar float-right"/>
+ <img t-att-src="kanban_image('res.users', 'image_128', record.user_id.raw_value)" t-att-title="record.user_id.value" t-att-alt="record.user_id.value" class="oe_kanban_avatar float-right"/>
</div>
</div>
</div>
@@ -401,7 +401,7 @@
<field name="arch" type="xml">
<calendar string="Leads Generation" mode="month" date_start="activity_date_deadline" color="user_id" hide_time="true" event_limit="5">
<field name="planned_revenue"/>
- <field name="partner_id" avatar_field="image_small"/>
+ <field name="partner_id" avatar_field="image_128"/>
</calendar>
</field>
</record>
@@ -433,7 +433,7 @@
<field name="company_currency"/>
<templates>
<div t-name="activity-box">
- <img t-att-src="activity_image('res.users', 'image_64', record.user_id.raw_value)" t-att-title="record.user_id.value" t-att-alt="record.user_id.value"/>
+ <img t-att-src="activity_image('res.users', 'image_128', record.user_id.raw_value)" t-att-title="record.user_id.value" t-att-alt="record.user_id.value"/>
<div>
<field name="name" display="full"/>
<field name="planned_revenue" widget="monetary" display="full" muted="1"/>
@@ -502,7 +502,7 @@
<field name="activity_ids" widget="kanban_activity"/>
</div>
<div class="oe_kanban_bottom_right">
- <img t-att-src="kanban_image('res.users', 'image_64', record.user_id.raw_value)" t-att-title="record.user_id.value" t-att-alt="record.user_id.value" width="24" height="24" class="oe_kanban_avatar"/>
+ <img t-att-src="kanban_image('res.users', 'image_128', record.user_id.raw_value)" t-att-title="record.user_id.value" t-att-alt="record.user_id.value" class="oe_kanban_avatar"/>
</div>
</div>
</div>
diff --git a/addons/event/views/event_views.xml b/addons/event/views/event_views.xml
index 23af02dc800..73b8afe7ea6 100644
--- a/addons/event/views/event_views.xml
+++ b/addons/event/views/event_views.xml
@@ -367,7 +367,7 @@
<field eval="2" name="priority"/>
<field name="arch" type="xml">
<calendar date_start="date_begin" date_stop="date_end" string="Event Organization" mode="month" color="event_type_id" event_limit="5">
- <field name="user_id" avatar_field="image_small"/>
+ <field name="user_id" avatar_field="image_128"/>
<field name="state"/>
<field name="seats_expected"/>
<field name="seats_reserved"/>
diff --git a/addons/fleet/views/fleet_vehicle_cost_views.xml b/addons/fleet/views/fleet_vehicle_cost_views.xml
index 45511641bbe..d9088a87aa7 100644
--- a/addons/fleet/views/fleet_vehicle_cost_views.xml
+++ b/addons/fleet/views/fleet_vehicle_cost_views.xml
@@ -368,7 +368,7 @@
<field name="purchaser_id"/>
<templates>
<div t-name="activity-box">
- <img t-att-src="activity_image('res.partner', 'image_64', record.purchaser_id.raw_value)" t-att-title="record.purchaser_id.value" t-att-alt="record.purchaser_id.value"/>
+ <img t-att-src="activity_image('res.partner', 'image_128', record.purchaser_id.raw_value)" t-att-title="record.purchaser_id.value" t-att-alt="record.purchaser_id.value"/>
<div>
<field name="vehicle_id" display="full"/>
<field name="cost_subtype_id" muted="1" display="full"/>
diff --git a/addons/gamification/data/goal_base.xml b/addons/gamification/data/goal_base.xml
index a09b588e237..b517bb50713 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_64)" alt="${goal['name']}"/>
+ <img style="margin-bottom:5px;width:50px;height:50px;border-radius:50%;object-fit:cover;" t-att-src="image_data_uri(object.env['res.users'].browse(goal['user_id']).partner_id.image_128)" alt="${goal['name']}"/>
</div>
<div align="center" style ="color:${bgColor};height:20px">
${goal['name']}
diff --git a/addons/gamification/static/src/scss/gamification.scss b/addons/gamification/static/src/scss/gamification.scss
index f047f263764..5139c1547a2 100644
--- a/addons/gamification/static/src/scss/gamification.scss
+++ b/addons/gamification/static/src/scss/gamification.scss
@@ -6,6 +6,7 @@
margin-top: 8px;
border-radius: 2px;
-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
+ object-fit: cover;
}
.o_kanban_content {
.o_goal_state_block {
diff --git a/addons/gamification/views/badge.xml b/addons/gamification/views/badge.xml
index 804b314f817..5dc93d1f921 100644
--- a/addons/gamification/views/badge.xml
+++ b/addons/gamification/views/badge.xml
@@ -148,7 +148,7 @@
<em><field name="description"/></em>
<div>
<t t-foreach="record.unique_owner_ids.raw_value.slice(0,11)" t-as="owner">
- <img width="24" height="24" class="oe_kanban_avatar" t-att-src="kanban_image('res.users', 'image_64', owner)" t-att-data-member_id="owner" alt="Owner"/>
+ <img class="oe_kanban_avatar o_image_24_cover" t-att-src="kanban_image('res.users', 'image_128', owner)" t-att-data-member_id="owner" alt="Owner"/>
</t>
</div>
</div>
diff --git a/addons/gamification/views/challenge.xml b/addons/gamification/views/challenge.xml
index 48214d14774..bbc11afe910 100644
--- a/addons/gamification/views/challenge.xml
+++ b/addons/gamification/views/challenge.xml
@@ -158,7 +158,7 @@
</div>
</strong>
<t t-foreach="record.user_ids.raw_value.slice(0,11)" t-as="member">
- <img class="o_kanban_badge_avatars" t-att-src="kanban_image('res.users', 'image_64', member)" t-att-data-member_id="member" alt="Member"/>
+ <img class="o_kanban_badge_avatars" t-att-src="kanban_image('res.users', 'image_128', member)" t-att-data-member_id="member" alt="Member"/>
</t>
</div>
</div>
diff --git a/addons/gamification/views/goal.xml b/addons/gamification/views/goal.xml
index 26409c21306..54cc076cadc 100644
--- a/addons/gamification/views/goal.xml
+++ b/addons/gamification/views/goal.xml
@@ -153,7 +153,7 @@
<div class="o_kanban_content">
<p><strong><h4 class="oe_goal_name text-center" tooltip="kanban-tooltip"><field name="definition_id" /></h4></strong></p>
<div class="float-left">
- <img t-att-src="kanban_image('res.users', 'image_64', record.user_id.raw_value)" t-att-title="record.user_id.value" t-att-alt="record.user_id.value" width="24" height="24" />
+ <img class="o_image_24_cover" t-att-src="kanban_image('res.users', 'image_128', record.user_id.raw_value)" t-att-title="record.user_id.value" t-att-alt="record.user_id.value"/>
</div>
<field name="user_id" />
<div class="o_goal_state_block">
diff --git a/addons/hr/models/hr_employee_public.py b/addons/hr/models/hr_employee_public.py
index 3d1fe02cc4f..75fe17fb156 100644
--- a/addons/hr/models/hr_employee_public.py
+++ b/addons/hr/models/hr_employee_public.py
@@ -38,7 +38,6 @@ class HrEmployeePublic(models.Model):
image_512 = fields.Image("Image 512", compute='_compute_image', compute_sudo=True)
image_256 = fields.Image("Image 256", compute='_compute_image', compute_sudo=True)
image_128 = fields.Image("Image 128", compute='_compute_image', compute_sudo=True)
- image_64 = fields.Image("Image 64", compute='_compute_image', compute_sudo=True)
parent_id = fields.Many2one('hr.employee.public', 'Manager', readonly=True)
coach_id = fields.Many2one('hr.employee.public', 'Coach', readonly=True)
@@ -51,7 +50,6 @@ class HrEmployeePublic(models.Model):
employee.image_512 = employee_id.image_512
employee.image_256 = employee_id.image_256
employee.image_128 = employee_id.image_128
- employee.image_64 = employee_id.image_64
@api.model
def _get_fields(self):
diff --git a/addons/hr/static/src/scss/hr.scss b/addons/hr/static/src/scss/hr.scss
index a80801032a3..3e7eaa8a42c 100644
--- a/addons/hr/static/src/scss/hr.scss
+++ b/addons/hr/static/src/scss/hr.scss
@@ -18,4 +18,10 @@
.o_employee_summary_icons > span {
white-space: nowrap;
}
+
+ .o_hr_rounded_circle {
+ @include media-breakpoint-down(sm) {
+ border-radius: 50% !important;
+ }
+ }
}
diff --git a/addons/hr/views/hr_employee_public_views.xml b/addons/hr/views/hr_employee_public_views.xml
index 0e93ca837c2..9a54172f4c1 100644
--- a/addons/hr/views/hr_employee_public_views.xml
+++ b/addons/hr/views/hr_employee_public_views.xml
@@ -113,10 +113,7 @@
<templates>
<t t-name="kanban-box">
<div class="oe_kanban_global_click o_kanban_record_has_image_fill o_hr_kanban_record">
- <!-- Medium employee's picture -->
- <field name="image_128" widget="image" class="o_kanban_image_fill_left d-none d-md-block" options="{'zoom': true, 'background': true, 'preventClicks': false}"/>
- <!-- Employee's picture optimized for mobile -->
- <field name="image_64" widget="image" class="o_kanban_image d-md-none rounded-circle" options="{'zoom': true, 'background': true, 'preventClicks': false}"/>
+ <field name="image_128" widget="image" class="o_kanban_image_fill_left o_hr_rounded_circle" options="{'zoom': true, 'background': true, 'preventClicks': false}"/>
<div class="oe_kanban_details">
<div class="o_kanban_record_top">
diff --git a/addons/hr/views/hr_employee_views.xml b/addons/hr/views/hr_employee_views.xml
index 0a37dbe2a23..34c40873270 100644
--- a/addons/hr/views/hr_employee_views.xml
+++ b/addons/hr/views/hr_employee_views.xml
@@ -224,10 +224,7 @@
<templates>
<t t-name="kanban-box">
<div class="oe_kanban_global_click o_kanban_record_has_image_fill o_hr_kanban_record">
- <!-- Medium employee's picture -->
- <field name="image_128" widget="image" class="o_kanban_image_fill_left d-none d-md-block" options="{'zoom': true, 'background': true, 'preventClicks': false}"/>
- <!-- Employee's picture optimized for mobile -->
- <field name="image_64" widget="image" class="o_kanban_image d-md-none rounded-circle" options="{'zoom': true, 'background': true, 'preventClicks': false}"/>
+ <field name="image_128" widget="image" class="o_kanban_image_fill_left o_hr_rounded_circle" options="{'zoom': true, 'background': true, 'preventClicks': false}"/>
<div class="oe_kanban_details">
<div class="o_kanban_record_top">
@@ -269,7 +266,7 @@
<field name="id"/>
<templates>
<div t-name="activity-box">
- <img t-att-src="activity_image('hr.employee', 'image_64', record.id.raw_value)" role="img" t-att-title="record.id.value" t-att-alt="record.id.value"/>
+ <img t-att-src="activity_image('hr.employee', 'image_128', record.id.raw_value)" role="img" t-att-title="record.id.value" t-att-alt="record.id.value"/>
<div>
<field name="name" display="full"/>
<field name="job_id" muted="1" display="full"/>
diff --git a/addons/hr_attendance/views/hr_attendance_view.xml b/addons/hr_attendance/views/hr_attendance_view.xml
index 5443b969ce9..5c9d2bd72f5 100644
--- a/addons/hr_attendance/views/hr_attendance_view.xml
+++ b/addons/hr_attendance/views/hr_attendance_view.xml
@@ -28,7 +28,7 @@
<t t-name="kanban-box">
<div t-attf-class="oe_kanban_global_click">
<div>
- <img t-att-src="kanban_image('hr.employee', 'image_64', record.employee_id.raw_value)" t-att-title="record.employee_id.value" t-att-alt="record.employee_id.value" width="24" height="24" class="oe_kanban_avatar mr4"/>
+ <img t-att-src="kanban_image('hr.employee', 'image_128', record.employee_id.raw_value)" t-att-title="record.employee_id.value" t-att-alt="record.employee_id.value" class="oe_kanban_avatar o_image_24_cover mr4"/>
<span class="o_kanban_record_title">
<strong><t t-esc="record.employee_id.value"/></strong>
</span>
diff --git a/addons/hr_expense/views/hr_expense_views.xml b/addons/hr_expense/views/hr_expense_views.xml
index d54fc1dac7b..be4b2fdcfea 100644
--- a/addons/hr_expense/views/hr_expense_views.xml
+++ b/addons/hr_expense/views/hr_expense_views.xml
@@ -250,7 +250,7 @@
<field name="currency_id"/>
<templates>
<div t-name="activity-box">
- <img t-att-src="activity_image('hr.employee', 'image_64', record.employee_id.raw_value)" t-att-title="record.employee_id.value" t-att-alt="record.employee_id.value"/>
+ <img t-att-src="activity_image('hr.employee', 'image_128', record.employee_id.raw_value)" t-att-title="record.employee_id.value" t-att-alt="record.employee_id.value"/>
<div>
<field name="name" display="full"/>
<field name="total_amount" widget="monetary" muted="1" display="full"/>
@@ -662,7 +662,7 @@
<field name="currency_id"/>
<templates>
<div t-name="activity-box">
- <img t-att-src="activity_image('hr.employee', 'image_64', record.employee_id.raw_value)" t-att-title="record.employee_id.value" t-att-alt="record.employee_id.value"/>
+ <img t-att-src="activity_image('hr.employee', 'image_128', record.employee_id.raw_value)" t-att-title="record.employee_id.value" t-att-alt="record.employee_id.value"/>
<div>
<field name="name" display="full"/>
<field name="total_amount" widget="monetary" muted="1" display="full"/>
diff --git a/addons/hr_holidays/report/hr_leave_reports.xml b/addons/hr_holidays/report/hr_leave_reports.xml
index c451fb36b1b..4bf32b5b560 100644
--- a/addons/hr_holidays/report/hr_leave_reports.xml
+++ b/addons/hr_holidays/report/hr_leave_reports.xml
@@ -71,7 +71,7 @@
<div t-attf-class="oe_kanban_global_click">
<div>
<span>
- <img t-att-src="kanban_image('hr.employee', 'image_64', record.employee_id.raw_value)" t-att-title="record.employee_id.value" t-att-alt="record.employee_id.value" width="40" height="40" class="oe_kanban_avatar float-left mr4"/>
+ <img t-att-src="kanban_image('hr.employee', 'image_128', record.employee_id.raw_value)" t-att-title="record.employee_id.value" t-att-alt="record.employee_id.value" class="oe_kanban_avatar o_image_40_cover float-left mr4"/>
</span>
<span>
<div>
diff --git a/addons/hr_holidays/views/hr_leave_allocation_views.xml b/addons/hr_holidays/views/hr_leave_allocation_views.xml
index 03235d6ff93..fdfe00925fa 100644
--- a/addons/hr_holidays/views/hr_leave_allocation_views.xml
+++ b/addons/hr_holidays/views/hr_leave_allocation_views.xml
@@ -254,11 +254,10 @@
<div class="oe_kanban_global_click container">
<div class="row no-gutters">
<div class="col-2">
- <img t-att-src="kanban_image('hr.employee', 'image_64', record.employee_id.raw_value)"
+ <img t-att-src="kanban_image('hr.employee', 'image_128', record.employee_id.raw_value)"
t-att-title="record.employee_id.value"
t-att-alt="record.employee_id.value"
- width="40" height="40"
- class="oe_kanban_avatar float-left mr4 col-md-"/>
+ class="oe_kanban_avatar o_image_40_cover float-left mr4"/>
</div>
<div class="col-10">
<span class="badge badge-pill float-right mt4 mr16"><t t-esc="record.number_of_days.value"/> days</span>
@@ -307,7 +306,7 @@
<field name="employee_id"/>
<templates>
<div t-name="activity-box">
- <img t-att-src="activity_image('hr.employee', 'image_64', record.employee_id.raw_value)" t-att-title="record.employee_id.value" t-att-alt="record.employee_id.value"/>
+ <img t-att-src="activity_image('hr.employee', 'image_128', record.employee_id.raw_value)" t-att-title="record.employee_id.value" t-att-alt="record.employee_id.value"/>
<div>
<field name="employee_id"/>
<span class="ml-3 text-muted">
diff --git a/addons/hr_holidays/views/hr_leave_views.xml b/addons/hr_holidays/views/hr_leave_views.xml
index e8dbae81977..295a16423da 100644
--- a/addons/hr_holidays/views/hr_leave_views.xml
+++ b/addons/hr_holidays/views/hr_leave_views.xml
@@ -110,11 +110,10 @@
<div class="oe_kanban_global_click container">
<div class="row no-gutters">
<div class="col-2">
- <img t-att-src="kanban_image('hr.employee', 'image_64', record.employee_id.raw_value)"
+ <img t-att-src="kanban_image('hr.employee', 'image_128', record.employee_id.raw_value)"
t-att-title="record.employee_id.value"
t-att-alt="record.employee_id.value"
- width="40" height="40"
- class="oe_kanban_avatar float-left mr4 col-md-"/>
+ class="oe_kanban_avatar o_image_40_cover float-left mr4"/>
</div>
<div class="col-10">
<span class="badge badge-pill float-right mt4 mr16"><t t-esc="record.number_of_days.value"/> days</span>
@@ -175,7 +174,7 @@
<field name="number_of_days"/>
<templates>
<div t-name="activity-box">
- <img t-att-src="activity_image('hr.employee', 'image_64', record.employee_id.raw_value)" t-att-title="record.employee_id.value" t-att-alt="record.employee_id.value" width="50" height="50"/>
+ <img t-att-src="activity_image('hr.employee', 'image_128', record.employee_id.raw_value)" t-att-title="record.employee_id.value" t-att-alt="record.employee_id.value" width="50" height="50"/>
<div>
<field name="name"/>
<span class="ml-3 text-muted">
diff --git a/addons/hr_maintenance/views/maintenance_views.xml b/addons/hr_maintenance/views/maintenance_views.xml
index 806a8fa85b9..569bf8ead05 100644
--- a/addons/hr_maintenance/views/maintenance_views.xml
+++ b/addons/hr_maintenance/views/maintenance_views.xml
@@ -100,7 +100,7 @@
<field name="department_id"/>
</xpath>
<xpath expr="//img[@t-att-title='record.owner_user_id.value']" position='replace'>
- <img t-att-src="kanban_image('hr.employee', 'image_64', record.employee_id.raw_value)" t-att-title="record.employee_id.value" t-att-alt="record.employee_id.value" width="27" height="27" class="oe_kanban_avatar"/>
+ <img t-att-src="kanban_image('hr.employee', 'image_128', record.employee_id.raw_value)" t-att-title="record.employee_id.value" t-att-alt="record.employee_id.value" class="oe_kanban_avatar"/>
</xpath>
<div t-if="record.serial_no.raw_value" position='after'>
<div t-if="!record.employee_id.raw_value">Unassigned</div>
diff --git a/addons/hr_recruitment/data/hr_recruitment_data.xml b/addons/hr_recruitment/data/hr_recruitment_data.xml
index 383f68e0021..66f75fe5fc3 100644
--- a/addons/hr_recruitment/data/hr_recruitment_data.xml
+++ b/addons/hr_recruitment/data/hr_recruitment_data.xml
@@ -95,7 +95,7 @@
<table>
<tr>
<td width="75">
- <img src="/web/image/res.users/${object.user_id.id}/image_64" alt="Avatar" style="vertical-align:baseline;max-width:64px;" />
+ <img src="/web/image/res.users/${object.user_id.id}/image_128" alt="Avatar" style="vertical-align:baseline; width: 64px; height: 64px; object-fit: cover;" />
</td>
<td>
<strong>${object.user_id.name}</strong><br/>
@@ -203,7 +203,7 @@
<table>
<tr>
<td width="75">
- <img src="/web/image/res.users/${object.user_id.id}/image_64" alt="Avatar" style="vertical-align:baseline;max-width:64px;" />
+ <img src="/web/image/res.users/${object.user_id.id}/image_128" alt="Avatar" style="vertical-align:baseline; width: 64px; height: 64px; object-fit: cover;" />
</td>
<td>
<strong>${object.user_id.name}</strong><br/>
diff --git a/addons/hr_recruitment/views/hr_recruitment_views.xml b/addons/hr_recruitment/views/hr_recruitment_views.xml
index 5634abf2aac..a0853756b09 100644
--- a/addons/hr_recruitment/views/hr_recruitment_views.xml
+++ b/addons/hr_recruitment/views/hr_recruitment_views.xml
@@ -337,7 +337,7 @@
<field name="legend_blocked" invisible="1"/>
<field name="legend_done" invisible="1"/>
</div>
- <img t-att-src="kanban_image('res.users', 'image_64', record.user_id.raw_value)" t-att-title="record.user_id.value" t-att-alt="record.user_id.value" width="30" height="30" class="oe_kanban_avatar"/>
+ <img t-att-src="kanban_image('res.users', 'image_128', record.user_id.raw_value)" t-att-title="record.user_id.value" t-att-alt="record.user_id.value" class="oe_kanban_avatar"/>
</div>
</div>
diff --git a/addons/hr_timesheet/views/hr_timesheet_views.xml b/addons/hr_timesheet/views/hr_timesheet_views.xml
index 260009012eb..6f5b16b7181 100644
--- a/addons/hr_timesheet/views/hr_timesheet_views.xml
+++ b/addons/hr_timesheet/views/hr_timesheet_views.xml
@@ -149,7 +149,7 @@
<div t-attf-class="oe_kanban_global_click">
<div class="row">
<div class="col-2">
- <img t-att-src="kanban_image('res.users', 'image_64', record.user_id.raw_value)" t-att-title="record.user_id.value" t-att-alt="record.user_id.value" width="40" height="40" class="oe_kanban_avatar float-left"/>
+ <img t-att-src="kanban_image('res.users', 'image_128', record.user_id.raw_value)" t-att-title="record.user_id.value" t-att-alt="record.user_id.value" class="oe_kanban_avatar o_image_40_cover float-left"/>
</div>
<div class="col-10">
<div>
diff --git a/addons/hr_work_entry/views/hr_work_entry_views.xml b/addons/hr_work_entry/views/hr_work_entry_views.xml
index 5a8aec788b7..b054c0ff029 100644
--- a/addons/hr_work_entry/views/hr_work_entry_views.xml
+++ b/addons/hr_work_entry/views/hr_work_entry_views.xml
@@ -28,7 +28,7 @@
color="color"
event_limit="5">
<!-- Sidebar favorites filters -->
- <field name="employee_id" write_model="hr.user.work.entry.employee" write_field="employee_id" avatar_field="image_64"/>
+ <field name="employee_id" write_model="hr.user.work.entry.employee" write_field="employee_id" avatar_field="image_128"/>
<field name="state"/>
</calendar>
</field>
diff --git a/addons/im_livechat/data/mail_data.xml b/addons/im_livechat/data/mail_data.xml
index 13fe131fb3a..9c8468cac6f 100644
--- a/addons/im_livechat/data/mail_data.xml
+++ b/addons/im_livechat/data/mail_data.xml
@@ -41,10 +41,10 @@
<tr>
<td valign="top" align="center" rowspan="2" t-att-style="'width: 70px;' + top + bottom + left">
<t t-if="message.author_avatar">
- <img t-attf-alt="{{author_name}}" height="64" width="64" t-attf-src="data:image/png;base64,{{message.author_avatar}}"/>
+ <img t-attf-alt="{{author_name}}" style="width: 64px; height: 64px; object-fit: cover;" t-attf-src="data:image/png;base64,{{message.author_avatar}}"/>
</t>
<t t-else="">
- <img t-attf-alt="{{author_name}}" height="64" width="64" src="/mail/static/src/img/smiley/avatar.jpg"/>
+ <img t-attf-alt="{{author_name}}" style="width: 64px; height: 64px; object-fit: cover;" src="/mail/static/src/img/smiley/avatar.jpg"/>
</t>
</td>
<td t-att-style="'padding-left: 5px; margin: 0px;' + top">
diff --git a/addons/im_livechat/views/mail_channel_views.xml b/addons/im_livechat/views/mail_channel_views.xml
index ac2dd35ce6d..a53ee2bc5d4 100644
--- a/addons/im_livechat/views/mail_channel_views.xml
+++ b/addons/im_livechat/views/mail_channel_views.xml
@@ -65,9 +65,9 @@
<div class="o_kanban_image">
<div>
<t t-if="record.author_avatar.raw_value">
- <img t-att-src="kanban_image('mail.message', 'author_avatar', record.id.raw_value)" alt="Avatar" class="rounded-circle"/>
+ <img t-att-src="kanban_image('mail.message', 'author_avatar', record.id.raw_value)" alt="Avatar" class="o_image_64_cover rounded-circle"/>
</t>
- <t t-else=""><img alt="Anonymous" src="/mail/static/src/img/smiley/avatar.jpg" class="rounded-circle"/></t>
+ <t t-else=""><img alt="Anonymous" src="/mail/static/src/img/smiley/avatar.jpg" class="o_image_64_cover rounded-circle"/></t>
</div>
</div>
<div class="oe_module_desc">
diff --git a/addons/lunch/controllers/main.py b/addons/lunch/controllers/main.py
index 9be1d8aa6b3..681f8133c1d 100644
--- a/addons/lunch/controllers/main.py
+++ b/addons/lunch/controllers/main.py
@@ -91,7 +91,7 @@ class LunchController(http.Controller):
res.update({
'username': user.sudo().name,
- 'userimage': '/web/image?model=res.users&id=%s&field=image_64' % user.id,
+ 'userimage': '/web/image?model=res.users&id=%s&field=image_128' % user.id,
'wallet': request.env['lunch.cashmove'].get_wallet_balance(user, False),
'is_manager': is_manager,
'locations': request.env['lunch.location'].search_read([], ['name']),
diff --git a/addons/lunch/report/lunch_cashmove_report_views.xml b/addons/lunch/report/lunch_cashmove_report_views.xml
index 64dba141ea4..9c807dc569a 100644
--- a/addons/lunch/report/lunch_cashmove_report_views.xml
+++ b/addons/lunch/report/lunch_cashmove_report_views.xml
@@ -106,7 +106,7 @@
<t t-esc="record.date.value"/>
</div>
<div class="col-6">
- <img t-att-src="kanban_image('res.users', 'image_64', record.user_id.raw_value)" t-att-title="record.user_id.value" t-att-alt="record.user_id.value" width="24" height="24" class="oe_kanban_avatar float-right"/>
+ <img t-att-src="kanban_image('res.users', 'image_128', record.user_id.raw_value)" t-att-title="record.user_id.value" t-att-alt="record.user_id.value" class="oe_kanban_avatar o_image_24_cover float-right"/>
</div>
</div>
</div>
diff --git a/addons/lunch/static/src/xml/lunch_kanban.xml b/addons/lunch/static/src/xml/lunch_kanban.xml
index 558086b72a6..bb995a6a348 100644
--- a/addons/lunch/static/src/xml/lunch_kanban.xml
+++ b/addons/lunch/static/src/xml/lunch_kanban.xml
@@ -6,7 +6,7 @@
<div class="o_lunch_widget_info col-12 col-md-4 card border-0">
<div class="card-body row no-gutters align-items-center">
<div class="col-3 col-md-6 col-lg-3">
- <img class="rounded-circle" t-attf-src="{{ widget.userimage }}"/>
+ <img class="o_image_64_cover rounded-circle" t-attf-src="{{ widget.userimage }}"/>
</div>
<div class="col-9 col-md-6 col-lg-9">
<div class="pl-3">
diff --git a/addons/lunch/views/lunch_cashmove_views.xml b/addons/lunch/views/lunch_cashmove_views.xml
index d1cafa0e47b..945402a30eb 100644
--- a/addons/lunch/views/lunch_cashmove_views.xml
+++ b/addons/lunch/views/lunch_cashmove_views.xml
@@ -77,7 +77,7 @@
<t t-esc="record.date.value"/>
</div>
<div class="col-6">
- <img t-att-src="kanban_image('res.users', 'image_64', record.user_id.raw_value)" t-att-title="record.user_id.value" t-att-alt="record.user_id.value" width="24" height="24" class="oe_kanban_avatar float-right"/>
+ <img t-att-src="kanban_image('res.users', 'image_128', record.user_id.raw_value)" t-att-title="record.user_id.value" t-att-alt="record.user_id.value" class="oe_kanban_avatar o_image_24_cover float-right"/>
</div>
</div>
</div>
diff --git a/addons/lunch/views/lunch_orders_views.xml b/addons/lunch/views/lunch_orders_views.xml
index 6bd0a5078ce..ea36b959123 100644
--- a/addons/lunch/views/lunch_orders_views.xml
+++ b/addons/lunch/views/lunch_orders_views.xml
@@ -91,7 +91,7 @@
</a>
</div>
<div class="col-6">
- <img t-att-src="kanban_image('res.users', 'image_64', record.user_id.raw_value)" t-att-title="record.user_id.value" t-att-alt="record.user_id.value" width="24" height="24" class="oe_kanban_avatar float-right"/>
+ <img t-att-src="kanban_image('res.users', 'image_128', record.user_id.raw_value)" t-att-title="record.user_id.value" t-att-alt="record.user_id.value" class="oe_kanban_avatar o_image_24_cover float-right"/>
</div>
</div>
</div>
diff --git a/addons/mail/models/mail_message.py b/addons/mail/models/mail_message.py
index d01ffb741e5..63ac13917e4 100644
--- a/addons/mail/models/mail_message.py
+++ b/addons/mail/models/mail_message.py
@@ -79,7 +79,7 @@ class Message(models.Model):
'res.partner', 'Author', index=True,
ondelete='set null', default=_get_default_author,
help="Author of the message. If not set, email_from may hold an email address that did not match any partner.")
- author_avatar = fields.Binary("Author's avatar", related='author_id.image_64', readonly=False)
+ author_avatar = fields.Binary("Author's avatar", related='author_id.image_128', readonly=False)
# recipients: include inactive partners (they may have been archived after
# the message was sent, but they should remain visible in the relation)
partner_ids = fields.Many2many('res.partner', string='Recipients', context={'active_test': False})
diff --git a/addons/mail/static/src/js/composers/basic_composer.js b/addons/mail/static/src/js/composers/basic_composer.js
index d79a7c93028..bfd97028a2d 100644
--- a/addons/mail/static/src/js/composers/basic_composer.js
+++ b/addons/mail/static/src/js/composers/basic_composer.js
@@ -100,7 +100,7 @@ var BasicComposer = Widget.extend({
this.avatarURL = session.uid > 0 ? session.url('/web/image', {
model: 'res.users',
- field: 'image_64',
+ field: 'image_128',
id: session.uid,
}) : '/web/static/src/img/user_menu_avatar.png';
},
diff --git a/addons/mail/static/src/js/followers.js b/addons/mail/static/src/js/followers.js
index 78783ad2386..cbe20ba240e 100644
--- a/addons/mail/static/src/js/followers.js
+++ b/addons/mail/static/src/js/followers.js
@@ -36,7 +36,7 @@ var Followers = AbstractField.extend({
init: function (parent, name, record, options) {
this._super.apply(this, arguments);
- this.image = this.attrs.image || 'image_64';
+ this.image = this.attrs.image || 'image_128';
this.comment = this.attrs.help || false;
this.followers = [];
@@ -120,7 +120,7 @@ var Followers = AbstractField.extend({
}
$follower_li = $(QWeb.render('mail.Followers.partner', {
- 'record': _.extend(record, {'avatar_url': '/web/image/' + record.res_model + '/' + record.res_id + '/image_64'}),
+ 'record': _.extend(record, {'avatar_url': '/web/image/' + record.res_model + '/' + record.res_id + '/image_128'}),
'widget': self})
);
$follower_li.appendTo($followers_list);
diff --git a/addons/mail/static/src/js/models/messages/message.js b/addons/mail/static/src/js/models/messages/message.js
index e5470d219a2..8327f4011fd 100644
--- a/addons/mail/static/src/js/models/messages/message.js
+++ b/addons/mail/static/src/js/models/messages/message.js
@@ -95,7 +95,7 @@ var Message = AbstractMessage.extend(Mixins.EventDispatcherMixin, ServicesMixin
if (this._isOdoobotAuthor()) {
return '/mail/static/src/img/odoobot.png';
} else if (this.hasAuthor()) {
- return '/web/image/res.partner/' + this.getAuthorID() + '/image_64';
+ return '/web/image/res.partner/' + this.getAuthorID() + '/image_128';
} else if (this.getType() === 'email') {
return '/mail/static/src/img/email_icon.png';
}
diff --git a/addons/mail/static/src/js/models/threads/dm_chat.js b/addons/mail/static/src/js/models/threads/dm_chat.js
index b53637e614b..6b56cd2c80d 100644
--- a/addons/mail/static/src/js/models/threads/dm_chat.js
+++ b/addons/mail/static/src/js/models/threads/dm_chat.js
@@ -91,7 +91,7 @@ var DMChat = TwoUserChannel.extend(ChannelSeenMixin, {
*/
getPreview: function () {
var result = this._super.apply(this, arguments);
- result.imageSRC = '/web/image/res.partner/' + this.getDirectPartnerID() + '/image_64';
+ result.imageSRC = '/web/image/res.partner/' + this.getDirectPartnerID() + '/image_128';
return result;
},
/**
diff --git a/addons/mail/static/src/scss/discuss.scss b/addons/mail/static/src/scss/discuss.scss
index b56d7747e8e..21ff765dfdb 100644
--- a/addons/mail/static/src/scss/discuss.scss
+++ b/addons/mail/static/src/scss/discuss.scss
@@ -350,6 +350,7 @@
width: 100%;
height: 100%;
border-radius: 50%;
+ object-fit: cover;
}
&.o_mail_preview_app > img {
border-radius: 2px;
diff --git a/addons/mail/static/src/scss/followers.scss b/addons/mail/static/src/scss/followers.scss
index edb38cc133a..031affb6e52 100644
--- a/addons/mail/static/src/scss/followers.scss
+++ b/addons/mail/static/src/scss/followers.scss
@@ -69,6 +69,8 @@
img {
width: $o-mail-partner-avatar-size;
+ height: $o-mail-partner-avatar-size;
+ object-fit: cover;
}
}
diff --git a/addons/mail/static/src/scss/mail_activity.scss b/addons/mail/static/src/scss/mail_activity.scss
index 16ad01a83b0..9f2a9f7002b 100644
--- a/addons/mail/static/src/scss/mail_activity.scss
+++ b/addons/mail/static/src/scss/mail_activity.scss
@@ -46,12 +46,14 @@
img {
width: 31px;
height: 31px;
+ object-fit: cover;
}
.o_avatar_icon {
@include o-position-absolute($right: -5px, $bottom: -5px);
width: 25px;
height: 25px;
+ object-fit: cover;
padding: 6px 5px;
text-align: center;
line-height: 1.2;
diff --git a/addons/mail/static/src/scss/systray.scss b/addons/mail/static/src/scss/systray.scss
index 6b57aa5a9a6..8330906c737 100644
--- a/addons/mail/static/src/scss/systray.scss
+++ b/addons/mail/static/src/scss/systray.scss
@@ -75,6 +75,7 @@
.o_mail_preview_image {
width: 40px;
height: 40px;
+ object-fit: cover;
.fa-circle-o {
display: none;
diff --git a/addons/mail/static/src/scss/thread.scss b/addons/mail/static/src/scss/thread.scss
index 3931c06004a..05f5517f404 100644
--- a/addons/mail/static/src/scss/thread.scss
+++ b/addons/mail/static/src/scss/thread.scss
@@ -92,7 +92,9 @@
}
.o_thread_message_avatar {
- max-width: $o-mail-thread-avatar-size;
+ width: $o-mail-thread-avatar-size;
+ height: $o-mail-thread-avatar-size;
+ object-fit: cover;
}
.o_thread_message_side_date {
display: none;
diff --git a/addons/mail/static/src/xml/activity.xml b/addons/mail/static/src/xml/activity.xml
index a915fccdf2e..8d41c15093b 100644
--- a/addons/mail/static/src/xml/activity.xml
+++ b/addons/mail/static/src/xml/activity.xml
@@ -17,7 +17,7 @@
<div class="o_thread_message" style="margin-bottom: 10px">
<div class="o_thread_message_sidebar">
<div class="o_avatar_stack">
- <img t-attf-src="/web/image#{activity.user_id[0] >= 0 ? ('/res.users/' + activity.user_id[0] + '/image_64') : ''}" class="o_thread_message_avatar rounded-circle mb8" t-att-title="activity.user_id[1]" t-att-alt="activity.user_id[1]"/>
+ <img t-attf-src="/web/image#{activity.user_id[0] >= 0 ? ('/res.users/' + activity.user_id[0] + '/image_128') : ''}" class="o_thread_message_avatar rounded-circle mb8" t-att-title="activity.user_id[1]" t-att-alt="activity.user_id[1]"/>
<i t-att-class="'o_avatar_icon fa ' + activity.icon + ' bg-' + (activity.state == 'planned'? 'success' : (activity.state == 'today'? 'warning' : 'danger')) + '-full'"
t-att-title="activity.activity_type_id[1]"/>
</div>
@@ -42,16 +42,16 @@
<dd class="mb8">
<t t-esc="activity.create_date.format(datetimeFormat)"/>
by
- <img t-attf-src="/web/image#{activity.create_uid[0] >= 0 ? ('/res.users/' + activity.create_uid[0] + '/image_64') : ''}"
+ <img t-attf-src="/web/image#{activity.create_uid[0] >= 0 ? ('/res.users/' + activity.create_uid[0] + '/image_128') : ''}"
height="18" width="18"
- class="rounded-circle mr4"
+ class="o_object_fit_cover rounded-circle mr4"
t-att-title="activity.create_uid[1]"
t-att-alt="activity.create_uid[1]"/>
<b><t t-esc="activity.create_uid[1]"/></b>
</dd>
<dt>Assigned to</dt>
<dd class="mb8">
- <img t-attf-src="/web/image#{activity.user_id[0] >= 0 ? ('/res.users/' + activity.user_id[0] + '/image_64') : ''}" height="18" width="18" class="rounded-circle mr4" t-att-title="activity.user_id[1]" t-att-alt="activity.user_id[1]"/>
+ <img t-attf-src="/web/image#{activity.user_id[0] >= 0 ? ('/res.users/' + activity.user_id[0] + '/image_128') : ''}" height="18" width="18" class="o_object_fit_cover rounded-circle mr4" t-att-title="activity.user_id[1]" t-att-alt="activity.user_id[1]"/>
<b><t t-esc="activity.user_id[1]"/></b>
<em>, due on </em><span t-attf-class="o_activity_color_#{activity.state}"><t t-esc="activity.date_deadline.format(dateFormat)"/></span>
</dd>
diff --git a/addons/mail/static/src/xml/composer.xml b/addons/mail/static/src/xml/composer.xml
index 83ce49a7021..071a8023e83 100644
--- a/addons/mail/static/src/xml/composer.xml
+++ b/addons/mail/static/src/xml/composer.xml
@@ -6,7 +6,7 @@
<h4>Drag Files Here <span class="fa fa-download"/></h4>
</div>
<div class="o_composer_container">
- <img t-if="widget.avatarURL" height="36" width="36" class="o_thread_message_sidebar o_chatter_avatar rounded-circle" t-att-src="widget.avatarURL" alt="Avatar"/>
+ <img t-if="widget.avatarURL" height="36" width="36" class="o_thread_message_sidebar o_chatter_avatar o_object_fit_cover rounded-circle" t-att-src="widget.avatarURL" alt="Avatar"/>
<div t-if="widget.extended" class="o_composer_subject">
<input tabindex="1" type="text" placeholder="Subject" class="o_input"/>
</div>
diff --git a/addons/mail/static/src/xml/followers.xml b/addons/mail/static/src/xml/followers.xml
index be85bbb64bc..8a0914737a2 100644
--- a/addons/mail/static/src/xml/followers.xml
+++ b/addons/mail/static/src/xml/followers.xml
@@ -36,7 +36,7 @@
t-att-title="record.title"
t-att-data-oe-model="record.res_model"
t-att-data-oe-id="record.res_id">
- <img t-att-src="record.avatar_url" alt="Avatar"/>
+ <img t-att-src="record.avatar_url" alt="Avatar" class="o_image_64_cover"/>
<t t-esc="record.name"/>
</a>
<button t-if="record.is_editable"
diff --git a/addons/mail/views/mail_activity_views.xml b/addons/mail/views/mail_activity_views.xml
index 1d9d9f5fcc5..7c115deb1ee 100644
--- a/addons/mail/views/mail_activity_views.xml
+++ b/addons/mail/views/mail_activity_views.xml
@@ -207,7 +207,7 @@
<field name="priority" eval="2"/>
<field name="arch" type="xml">
<calendar string="Activity" date_start="date_deadline" color="activity_type_id">
- <field name="user_id" avatar_field="image_small"/>
+ <field name="user_id" avatar_field="image_128"/>
<field name="res_name"/>
<field name="date_deadline"/>
<field name="summary"/>
diff --git a/addons/mail/views/mail_message_views.xml b/addons/mail/views/mail_message_views.xml
index 6bb1bab6f49..611790c3310 100644
--- a/addons/mail/views/mail_message_views.xml
+++ b/addons/mail/views/mail_message_views.xml
@@ -179,7 +179,7 @@
<field name="create_date" widget="date"/>
</time>
<div class="oe_kanban_bottom_right">
- <img t-att-src="kanban_image('res.users', 'image_64', record.create_uid.raw_value)" t-att-data-member_id="record.create_uid.raw_value" t-att-alt="record.create_uid.raw_value" width="32" height="32" class="oe_kanban_avatar"/>
+ <img t-att-src="kanban_image('res.users', 'image_128', record.create_uid.raw_value)" t-att-data-member_id="record.create_uid.raw_value" t-att-alt="record.create_uid.raw_value" class="oe_kanban_avatar"/>
</div>
</div>
</div>
diff --git a/addons/mail/views/res_partner_views.xml b/addons/mail/views/res_partner_views.xml
index 842901b59c8..8b4b1abf7a2 100644
--- a/addons/mail/views/res_partner_views.xml
+++ b/addons/mail/views/res_partner_views.xml
@@ -54,7 +54,7 @@
<field name="id"/>
<templates>
<div t-name="activity-box">
- <img t-att-src="activity_image('res.partner', 'image_64', record.id.raw_value)" role="img" t-att-title="record.id.value" t-att-alt="record.id.value"/>
+ <img t-att-src="activity_image('res.partner', 'image_128', record.id.raw_value)" role="img" t-att-title="record.id.value" t-att-alt="record.id.value"/>
<div>
<field name="name" display="full"/>
<field name="parent_id" muted="1" display="full"/>
diff --git a/addons/maintenance/views/maintenance_views.xml b/addons/maintenance/views/maintenance_views.xml
index e91c6673927..235732cc63e 100644
--- a/addons/maintenance/views/maintenance_views.xml
+++ b/addons/maintenance/views/maintenance_views.xml
@@ -166,7 +166,7 @@
</div>
<div class="oe_kanban_bottom_right">
<field name="kanban_state" widget="state_selection"/>
- <img t-att-src="kanban_image('res.users', 'image_64', record.user_id.raw_value)" t-att-title="record.user_id.value" t-att-alt="record.user_id.value" width="24" height="24" class="oe_kanban_avatar float-right"/>
+ <img t-att-src="kanban_image('res.users', 'image_128', record.user_id.raw_value)" t-att-title="record.user_id.value" t-att-alt="record.user_id.value" class="oe_kanban_avatar float-right"/>
</div>
</div>
</div>
@@ -469,7 +469,7 @@
<div class="o_kanban_inline_block" t-if="!selection_mode">
<field name="activity_ids" widget="kanban_activity" />
</div>
- <img t-att-src="kanban_image('res.users', 'image_64', record.owner_user_id.raw_value)" t-att-title="record.owner_user_id.value" t-att-alt="record.owner_user_id.value" width="27" height="27" class="oe_kanban_avatar"/>
+ <img t-att-src="kanban_image('res.users', 'image_128', record.owner_user_id.raw_value)" t-att-title="record.owner_user_id.value" t-att-alt="record.owner_user_id.value" class="oe_kanban_avatar"/>
</div>
</div>
</div>
@@ -663,7 +663,7 @@
<div t-attf-class="oe_kanban_global_click">
<div class="mb4">
<strong><field name="name"/></strong>
- <img t-att-src="kanban_image('res.users', 'image_64', record.technician_user_id.raw_value)" t-att-title="record.technician_user_id.value" t-att-alt="record.technician_user_id.value" width="24" height="24" class="oe_kanban_avatar float-right"/>
+ <img t-att-src="kanban_image('res.users', 'image_128', record.technician_user_id.raw_value)" t-att-title="record.technician_user_id.value" t-att-alt="record.technician_user_id.value" class="oe_kanban_avatar o_image_24_cover float-right"/>
</div>
<div class="row mt4">
<div class="col-6">
diff --git a/addons/mass_mailing/views/mailing_mailing_views.xml b/addons/mass_mailing/views/mailing_mailing_views.xml
index e82e4e85c44..133a54ffe27 100644
--- a/addons/mass_mailing/views/mailing_mailing_views.xml
+++ b/addons/mass_mailing/views/mailing_mailing_views.xml
@@ -328,7 +328,7 @@
</div>
<div>
<span class="fa fa-clock-o text-muted mr-2" attrs="{'invisible': [('sent_date', '=', False)]}"/><field name="sent_date"/>
- <img t-att-src="kanban_image('res.users', 'image_64', record.user_id.raw_value)" t-att-title="record.user_id.value" t-att-alt="record.user_id.value" width="24" height="24" class="oe_kanban_avatar float-right"/>
+ <img t-att-src="kanban_image('res.users', 'image_128', record.user_id.raw_value)" t-att-title="record.user_id.value" t-att-alt="record.user_id.value" class="o_image_24_cover oe_kanban_avatar float-right"/>
</div>
<div name="div_total_model" class="oe_clear text-muted" style="display: inline;">
<field name='total'/>
diff --git a/addons/mrp/views/ir_attachment_view.xml b/addons/mrp/views/ir_attachment_view.xml
index 1392dc689d8..5c9fede73ff 100644
--- a/addons/mrp/views/ir_attachment_view.xml
+++ b/addons/mrp/views/ir_attachment_view.xml
@@ -37,7 +37,7 @@
<field name="priority" widget="priority"/>
</span>
<div class="oe_kanban_bottom_right">
- <img t-att-src="kanban_image('res.users', 'image_64', record.create_uid.raw_value)" t-att-data-member_id="record.create_uid.raw_value" t-att-alt="record.create_uid.raw_value" width="32" height="32" class="oe_kanban_avatar"/>
+ <img t-att-src="kanban_image('res.users', 'image_128', record.create_uid.raw_value)" t-att-data-member_id="record.create_uid.raw_value" t-att-alt="record.create_uid.raw_value" class="oe_kanban_avatar"/>
</div>
</div>
</div>
diff --git a/addons/mrp/views/mrp_production_views.xml b/addons/mrp/views/mrp_production_views.xml
index 36d7733698e..45e378810db 100644
--- a/addons/mrp/views/mrp_production_views.xml
+++ b/addons/mrp/views/mrp_production_views.xml
@@ -255,7 +255,7 @@
<calendar date_start="date_planned_start" date_stop="date_planned_finished"
string="Manufacturing Orders" color="routing_id" event_limit="5">
<field name="routing_id"/>
- <field name="user_id" avatar_field="image_small"/>
+ <field name="user_id" avatar_field="image_128"/>
<field name="product_id"/>
<field name="product_qty"/>
</calendar>
diff --git a/addons/mrp/views/mrp_workorder_views.xml b/addons/mrp/views/mrp_workorder_views.xml
index a58c103e0f0..d0ff3d1e926 100644
--- a/addons/mrp/views/mrp_workorder_views.xml
+++ b/addons/mrp/views/mrp_workorder_views.xml
@@ -412,7 +412,7 @@
<span t-if="record.working_state.raw_value != 'blocked' and record.working_user_ids.raw_value.length == 0 and record.last_working_user_id.raw_value"><i class="fa fa-pause" role="img" aria-label="Pause" title="Pause"/></span>
<span t-if="record.working_state.raw_value == 'blocked' and (record.working_user_ids.raw_value.length == 0 or record.last_working_user_id.raw_value)"><i class="fa fa-stop" role="img" aria-label="Stop" title="Stop"/></span>
<t t-if="record.last_working_user_id.raw_value">
- <img t-att-src="kanban_image('res.users', 'image_64', record.last_working_user_id.raw_value)" width="24" height="24" class="oe_kanban_avatar" alt="Avatar"/>
+ <img t-att-src="kanban_image('res.users', 'image_128', record.last_working_user_id.raw_value)" class="oe_kanban_avatar" alt="Avatar"/>
</t>
</div>
</div>
diff --git a/addons/note/views/note_views.xml b/addons/note/views/note_views.xml
index cb1ba5cb4ae..5038f4ea25c 100644
--- a/addons/note/views/note_views.xml
+++ b/addons/note/views/note_views.xml
@@ -122,7 +122,7 @@
<t t-if="record.message_partner_ids.raw_value.length &gt; 1">
<div class="clearfix"></div>
<t t-foreach="record.message_partner_ids.raw_value" t-as="follower">
- <img t-att-src="kanban_image('res.partner', 'image_64', follower)" width="24" height="24" class="oe_kanban_avatar float-right" t-att-data-member_id="follower" alt="Follower"/>
+ <img t-att-src="kanban_image('res.partner', 'image_128', follower)" class="oe_kanban_avatar o_image_24_cover float-right" t-att-data-member_id="follower" alt="Follower"/>
</t>
<div class="clearfix"></div>
</t>
diff --git a/addons/point_of_sale/static/src/js/screens.js b/addons/point_of_sale/static/src/js/screens.js
index db7afa38638..011bcce36fc 100644
--- a/addons/point_of_sale/static/src/js/screens.js
+++ b/addons/point_of_sale/static/src/js/screens.js
@@ -1321,7 +1321,7 @@ var ClientListScreenWidget = ScreenWidget.extend({
}
},
partner_icon_url: function(id){
- return '/web/image?model=res.partner&id='+id+'&field=image_64';
+ return '/web/image?model=res.partner&id='+id+'&field=image_128';
},
// ui handle for the 'edit selected customer' action
diff --git a/addons/point_of_sale/static/src/xml/pos.xml b/addons/point_of_sale/static/src/xml/pos.xml
index c3ad09966d7..aed72db01be 100644
--- a/addons/point_of_sale/static/src/xml/pos.xml
+++ b/addons/point_of_sale/static/src/xml/pos.xml
@@ -363,7 +363,7 @@
<i class='fa fa-camera' role="img" aria-label="Picture" title="Picture"></i>
</t>
<t t-if='partner.id'>
- <img t-att-src='widget.partner_icon_url(partner.id)' alt="Partner"/>
+ <img t-att-src='widget.partner_icon_url(partner.id)' alt="Partner" style="width: 64px; height: 64px; object-fit: cover;"/>
</t>
<input type='file' class='image-uploader'></input>
</div>
@@ -445,7 +445,7 @@
<t t-name="ClientDetails">
<section class='client-details'>
<div class='client-picture'>
- <img t-att-src='widget.partner_icon_url(partner.id)' alt="Partner logo"/>
+ <img t-att-src='widget.partner_icon_url(partner.id)' alt="Partner logo" style="width: 64px; height: 64px; object-fit: cover;"/>
</div>
<div class='client-name'><t t-esc='partner.name' /></div>
<div class='edit-buttons'>
diff --git a/addons/point_of_sale/views/point_of_sale_dashboard.xml b/addons/point_of_sale/views/point_of_sale_dashboard.xml
index 7a5fe9ab3dc..85702e7204a 100644
--- a/addons/point_of_sale/views/point_of_sale_dashboard.xml
+++ b/addons/point_of_sale/views/point_of_sale_dashboard.xml
@@ -118,12 +118,10 @@
</div>
<div style="text-align:right;" t-if="record.current_user_id.value">
<img
- class="oe_kanban_avatar"
- t-att-src="kanban_image('res.users', 'image_64', record.current_user_id.raw_value)"
+ class="oe_kanban_avatar o_image_24_cover"
+ t-att-src="kanban_image('res.users', 'image_128', record.current_user_id.raw_value)"
t-att-title="record.current_user_id.value"
t-att-alt="record.current_user_id.value"
- width="24"
- height="24"
/>
</div>
</div><div class="container o_kanban_card_manage_pane dropdown-menu" role="menu">
diff --git a/addons/point_of_sale/views/pos_session_view.xml b/addons/point_of_sale/views/pos_session_view.xml
index 252c681bdb7..7ccde2a1d17 100644
--- a/addons/point_of_sale/views/pos_session_view.xml
+++ b/addons/point_of_sale/views/pos_session_view.xml
@@ -161,7 +161,7 @@
<span><field name="start_at" /></span>
</div>
<div class="oe_kanban_bottom_right">
- <img t-att-src="kanban_image('res.users', 'image_64', record.user_id.raw_value)" t-att-title="record.user_id.value" t-att-alt="record.user_id.value" width="24" height="24" class="oe_kanban_avatar float-right"/>
+ <img t-att-src="kanban_image('res.users', 'image_128', record.user_id.raw_value)" t-att-title="record.user_id.value" t-att-alt="record.user_id.value" class="oe_kanban_avatar float-right"/>
</div>
</div>
</div>
diff --git a/addons/portal/static/src/scss/portal.scss b/addons/portal/static/src/scss/portal.scss
index 5bd0b6ff02d..45d01128614 100644
--- a/addons/portal/static/src/scss/portal.scss
+++ b/addons/portal/static/src/scss/portal.scss
@@ -428,6 +428,7 @@ form label {
.o_portal_contact_img {
width: 2.3em;
height: 2.3em;
+ object-fit: cover;
}
.o_portal_sidebar {
diff --git a/addons/portal/static/src/xml/portal_chatter.xml b/addons/portal/static/src/xml/portal_chatter.xml
index e475b180974..ec7c688d32b 100644
--- a/addons/portal/static/src/xml/portal_chatter.xml
+++ b/addons/portal/static/src/xml/portal_chatter.xml
@@ -29,7 +29,7 @@
</t>
<t t-if="widget.options['display_composer']">
<div class="media">
- <img alt="Avatar" class="o_portal_chatter_avatar" t-attf-src="/web/image/res.partner/#{widget.options['partner_id']}/image_64/50x50"/>
+ <img alt="Avatar" class="o_portal_chatter_avatar" t-attf-src="/web/image/res.partner/#{widget.options['partner_id']}/image_128/50x50"/>
<div class="media-body">
<form class="o_portal_chatter_composer_form" t-attf-action="/mail/chatter_post" method="POST">
<input type="hidden" name="csrf_token" t-att-value="widget.options['csrf_token']"/>
diff --git a/addons/product/models/product.py b/addons/product/models/product.py
index 723490c7c03..e566cc0cf22 100644
--- a/addons/product/models/product.py
+++ b/addons/product/models/product.py
@@ -128,7 +128,6 @@ class ProductProduct(models.Model):
image_variant_512 = fields.Image("Variant Image 512", related="image_variant_1920", max_width=512, max_height=512, store=True)
image_variant_256 = fields.Image("Variant Image 256", related="image_variant_1920", max_width=256, max_height=256, store=True)
image_variant_128 = fields.Image("Variant Image 128", related="image_variant_1920", max_width=128, max_height=128, store=True)
- image_variant_64 = fields.Image("Variant Image 64", related="image_variant_1920", max_width=64, max_height=64, store=True)
can_image_variant_1024_be_zoomed = fields.Boolean("Can Variant Image 1024 be zoomed", compute='_compute_can_image_variant_1024_be_zoomed', store=True)
# Computed fields that are used to create a fallback to the template if
@@ -138,7 +137,6 @@ class ProductProduct(models.Model):
image_512 = fields.Image("Image 512", compute='_compute_image_512')
image_256 = fields.Image("Image 256", compute='_compute_image_256')
image_128 = fields.Image("Image 128", compute='_compute_image_128')
- image_64 = fields.Image("Image 64", compute='_compute_image_64')
can_image_1024_be_zoomed = fields.Boolean("Can Image 1024 be zoomed", compute='_compute_can_image_1024_be_zoomed')
@api.depends('image_variant_1920', 'image_variant_1024')
@@ -191,11 +189,6 @@ class ProductProduct(models.Model):
for record in self:
record.image_128 = record.image_variant_128 or record.product_tmpl_id.image_128
- def _compute_image_64(self):
- """Get the image from the template if no image is set on the variant."""
- for record in self:
- record.image_64 = record.image_variant_64 or record.product_tmpl_id.image_64
-
def _compute_can_image_1024_be_zoomed(self):
"""Get the image from the template if no image is set on the variant."""
for record in self:
diff --git a/addons/product/models/product_template.py b/addons/product/models/product_template.py
index 75167a7184a..105ac2f7f8f 100644
--- a/addons/product/models/product_template.py
+++ b/addons/product/models/product_template.py
@@ -390,7 +390,6 @@ class ProductTemplate(models.Model):
'image_512',
'image_256',
'image_128',
- 'image_64',
'can_image_1024_be_zoomed',
])
return res
diff --git a/addons/product/views/product_template_views.xml b/addons/product/views/product_template_views.xml
index ab5fea4f027..e0f9cdf28c1 100644
--- a/addons/product/views/product_template_views.xml
+++ b/addons/product/views/product_template_views.xml
@@ -78,7 +78,7 @@
<t t-name="kanban-box">
<div class="oe_kanban_global_click">
<div class="o_kanban_image">
- <img t-att-src="kanban_image('product.template', 'image_64', record.id.raw_value)" alt="Product"/>
+ <img t-att-src="kanban_image('product.template', 'image_128', record.id.raw_value)" alt="Product" class="o_image_64_contain"/>
</div>
<div class="oe_kanban_details">
<strong class="o_kanban_record_title">
@@ -111,7 +111,7 @@
<field name="id"/>
<templates>
<div t-name="activity-box">
- <img t-att-src="activity_image('product.template', 'image_64', record.id.raw_value)" role="img" t-att-title="record.id.value" t-att-alt="record.id.value"/>
+ <img t-att-src="activity_image('product.template', 'image_128', record.id.raw_value)" role="img" t-att-title="record.id.value" t-att-alt="record.id.value"/>
<div>
<field name="name" display="full"/>
<div t-if="record.default_code.value" class="text-muted">
diff --git a/addons/product/views/product_views.xml b/addons/product/views/product_views.xml
index 7941bb01f90..17ced8bd480 100644
--- a/addons/product/views/product_views.xml
+++ b/addons/product/views/product_views.xml
@@ -361,7 +361,7 @@
<t t-name="kanban-box">
<div class="oe_kanban_global_click">
<div class="o_kanban_image">
- <img t-att-src="kanban_image('product.product', 'image_64', record.id.raw_value)" alt="Product"/>
+ <img t-att-src="kanban_image('product.product', 'image_128', record.id.raw_value)" alt="Product" class="o_image_64_contain"/>
</div>
<div class="oe_kanban_details">
<strong class="o_kanban_record_title">
@@ -392,7 +392,7 @@
<field name="default_code"/>
<templates>
<div t-name="activity-box">
- <img t-att-src="activity_image('product.product', 'image_64', record.id.raw_value)" role="img" t-att-title="record.id.value" t-att-alt="record.id.value"/>
+ <img t-att-src="activity_image('product.product', 'image_128', record.id.raw_value)" role="img" t-att-title="record.id.value" t-att-alt="record.id.value"/>
<div>
<field name="name" display="full"/>
<div t-if="record.default_code.value" class="text-muted">
diff --git a/addons/project/views/project_views.xml b/addons/project/views/project_views.xml
index 7b395088f2c..4a2263abef3 100644
--- a/addons/project/views/project_views.xml
+++ b/addons/project/views/project_views.xml
@@ -250,7 +250,7 @@
</div>
<div class="col-4">
<div class="oe_kanban_bottom_right">
- <img t-att-src="kanban_image('res.users', 'image_64', record.user_id.raw_value)" t-att-title="record.user_id.value" t-att-alt="record.user_id.value" width="24" height="24" class="oe_kanban_avatar float-right"/>
+ <img t-att-src="kanban_image('res.users', 'image_128', record.user_id.raw_value)" t-att-title="record.user_id.value" t-att-alt="record.user_id.value" class="oe_kanban_avatar o_image_24_cover float-right"/>
</div>
</div>
</div>
@@ -631,7 +631,7 @@
</div>
<div class="oe_kanban_bottom_right" t-if="!selection_mode">
<field name="kanban_state" widget="state_selection" groups="base.group_user" invisible="context.get('fsm_mode', False)"/>
- <img t-att-src="kanban_image('res.users', 'image_64', record.user_id.raw_value)" t-att-title="record.user_id.value" t-att-alt="record.user_id.value" width="24" height="24" class="oe_kanban_avatar"/>
+ <img t-att-src="kanban_image('res.users', 'image_128', record.user_id.raw_value)" t-att-title="record.user_id.value" t-att-alt="record.user_id.value" class="oe_kanban_avatar"/>
</div>
</div>
</div>
@@ -685,7 +685,7 @@
<field eval="2" name="priority"/>
<field name="arch" type="xml">
<calendar date_start="date_deadline" string="Tasks" mode="month" color="user_id" event_limit="5" hide_time="true">
- <field name="user_id" avatar_field="image_small"/>
+ <field name="user_id" avatar_field="image_128"/>
<field name="date_deadline"/>
<field name="project_id"/>
<field name="priority" widget="priority"/>
@@ -724,7 +724,7 @@
<field name="user_id"/>
<templates>
<div t-name="activity-box">
- <img t-att-src="activity_image('res.users', 'image_64', record.user_id.raw_value)" t-att-title="record.user_id.value" t-att-alt="record.user_id.value"/>
+ <img t-att-src="activity_image('res.users', 'image_128', record.user_id.raw_value)" t-att-title="record.user_id.value" t-att-alt="record.user_id.value"/>
<div>
<field name="name" display="full"/>
<field name="project_id" muted="1" display="full" invisible="context.get('default_project_id', False)"/>
diff --git a/addons/purchase/views/portal_templates.xml b/addons/purchase/views/portal_templates.xml
index 58bcee1741f..13d588e6200 100644
--- a/addons/purchase/views/portal_templates.xml
+++ b/addons/purchase/views/portal_templates.xml
@@ -103,7 +103,7 @@
<t t-set="current_subtotal" t-value="current_subtotal + ol.price_total" groups="account.group_show_line_subtotals_tax_included"/>
<div t-if="not ol.display_type" class="row purchases_vertical_align">
<div class="col-lg-1 text-center">
- <img t-att-src="image_data_uri(resize_to_48(ol.product_id.image_64))" alt="Product"/>
+ <img t-att-src="image_data_uri(resize_to_48(ol.product_id.image_128))" alt="Product"/>
</div>
<div id='product_name' class="col-lg-5">
<span t-esc="ol.product_id.name"/>
diff --git a/addons/purchase_requisition/views/purchase_requisition_views.xml b/addons/purchase_requisition/views/purchase_requisition_views.xml
index 92896f8f204..9b72b591c3e 100644
--- a/addons/purchase_requisition/views/purchase_requisition_views.xml
+++ b/addons/purchase_requisition/views/purchase_requisition_views.xml
@@ -244,7 +244,7 @@
<field name="vendor_id"/>
</div>
<div class="oe_kanban_bottom_right">
- <img t-att-src="kanban_image('res.users', 'image_64', record.user_id.raw_value)" t-att-title="record.user_id.value" t-att-alt="record.user_id.value" width="24" height="24" class="oe_kanban_avatar float-right"/>
+ <img t-att-src="kanban_image('res.users', 'image_128', record.user_id.raw_value)" t-att-title="record.user_id.value" t-att-alt="record.user_id.value" class="oe_kanban_avatar float-right"/>
</div>
</div>
</div>
diff --git a/addons/resource/views/resource_views.xml b/addons/resource/views/resource_views.xml
index 9fa387ca996..ffa46279b3e 100644
--- a/addons/resource/views/resource_views.xml
+++ b/addons/resource/views/resource_views.xml
@@ -107,7 +107,7 @@
<field name="model">resource.calendar.leaves</field>
<field name="arch" type="xml">
<calendar date_start="date_from" date_stop="date_to" mode="month" string="Resource" color="resource_id" event_limit="5">
- <field name="resource_id" avatar_field="image_small"/>
+ <field name="resource_id" avatar_field="image_128"/>
<field name="company_id"/>
<field name="name"/>
</calendar>
diff --git a/addons/sale/data/mail_data.xml b/addons/sale/data/mail_data.xml
index 05ef93eaaa4..1176f677c19 100644
--- a/addons/sale/data/mail_data.xml
+++ b/addons/sale/data/mail_data.xml
@@ -154,7 +154,7 @@
<td colspan="4"><i>${line.name}</i></td>
% else:
<td style="width: 150px;">
- <img src="/web/image/product.product/${line.product_id.id}/image_64" width="64" alt="Product image"></img>
+ <img src="/web/image/product.product/${line.product_id.id}/image_128" style="width: 64px; height: 64px; object-fit: contain;" alt="Product image"></img>
</td>
<td align="left">${line.product_id.name}</td>
<td>${line.product_uom_qty}</td>
diff --git a/addons/sale/views/sale_views.xml b/addons/sale/views/sale_views.xml
index 4e9d5b47898..24a927347a4 100644
--- a/addons/sale/views/sale_views.xml
+++ b/addons/sale/views/sale_views.xml
@@ -115,7 +115,7 @@
<field name="model">sale.order</field>
<field name="arch" type="xml">
<calendar string="Sales Orders" date_start="date_order" color="state" hide_time="true" event_limit="5">
- <field name="partner_id" avatar_field="image_small"/>
+ <field name="partner_id" avatar_field="image_128"/>
<field name="amount_total" widget="monetary"/>
<field name="payment_term_id"/>
</calendar>
diff --git a/addons/sales_team/views/crm_team_views.xml b/addons/sales_team/views/crm_team_views.xml
index 70966bc0d75..81cb9d0f76a 100644
--- a/addons/sales_team/views/crm_team_views.xml
+++ b/addons/sales_team/views/crm_team_views.xml
@@ -87,7 +87,7 @@
<t t-name="kanban-box">
<div class="oe_kanban_global_click" style="max-width: 200px">
<div class="o_kanban_record_top">
- <img t-att-src="kanban_image('res.users', 'image_64', record.id.raw_value)" height="40" width="40" class="oe_avatar oe_kanban_avatar_smallbox mb0" alt="Avatar"/>
+ <img t-att-src="kanban_image('res.users', 'image_128', record.id.raw_value)" class="oe_avatar oe_kanban_avatar_smallbox o_image_40_cover mb0" alt="Avatar"/>
<div class="o_kanban_record_headings ml8">
<strong class="o_kanban_record_title"><field name="name"/></strong>
</div>
diff --git a/addons/stock_picking_batch/views/stock_picking_batch_views.xml b/addons/stock_picking_batch/views/stock_picking_batch_views.xml
index 53960b737a3..e5480d1091c 100644
--- a/addons/stock_picking_batch/views/stock_picking_batch_views.xml
+++ b/addons/stock_picking_batch/views/stock_picking_batch_views.xml
@@ -78,7 +78,7 @@
<div class="o_kanban_record_bottom">
<div class="oe_kanban_bottom_left"/>
<div class="oe_kanban_bottom_right">
- <img t-att-src="kanban_image('res.users', 'image_64', record.user_id.raw_value)" t-att-title="record.user_id.value" t-att-alt="record.user_id.value" width="24" height="24" class="oe_kanban_avatar"/>
+ <img t-att-src="kanban_image('res.users', 'image_128', record.user_id.raw_value)" t-att-title="record.user_id.value" t-att-alt="record.user_id.value" class="oe_kanban_avatar"/>
</div>
</div>
</div>
diff --git a/addons/web/controllers/main.py b/addons/web/controllers/main.py
index 7803f658f39..37647b6e46e 100644
--- a/addons/web/controllers/main.py
+++ b/addons/web/controllers/main.py
@@ -1190,7 +1190,7 @@ class Binary(http.Controller):
'/web/partner_image/<int:rec_id>',
'/web/partner_image/<int:rec_id>/<string:field>',
'/web/partner_image/<int:rec_id>/<string:field>/<string:model>/'], type='http', auth="public")
- def content_image_partner(self, rec_id, field='image_64', model='res.partner', **kwargs):
+ def content_image_partner(self, rec_id, field='image_128', model='res.partner', **kwargs):
# other kwargs are ignored on purpose
return self._content_image(id=rec_id, model='res.partner', field=field,
placeholder='user_placeholder.jpg')
diff --git a/addons/web/static/src/js/chrome/user_menu.js b/addons/web/static/src/js/chrome/user_menu.js
index 3b93bbd9c3b..ffc23e53273 100644
--- a/addons/web/static/src/js/chrome/user_menu.js
+++ b/addons/web/static/src/js/chrome/user_menu.js
@@ -46,7 +46,7 @@ var UserMenu = Widget.extend({
self.$('.oe_topbar_name').text(topbar_name);
var avatar_src = session.url('/web/image', {
model:'res.users',
- field: 'image_64',
+ field: 'image_128',
id: session.uid,
});
$avatar.attr('src', avatar_src);
diff --git a/addons/web/static/src/js/fields/relational_fields.js b/addons/web/static/src/js/fields/relational_fields.js
index 2a56c6c93e8..b89900c9b3b 100644
--- a/addons/web/static/src/js/fields/relational_fields.js
+++ b/addons/web/static/src/js/fields/relational_fields.js
@@ -2381,7 +2381,7 @@ var FieldMany2ManyTagsAvatar = FieldMany2ManyTags.extend({
_getRenderTagsContext: function () {
var result = this._super.apply(this, arguments);
result.avatarModel = this.nodeOptions.avatarModel || this.field.relation;
- result.avatarField = this.nodeOptions.avatarField || 'image_64';
+ result.avatarField = this.nodeOptions.avatarField || 'image_128';
return result;
},
});
diff --git a/addons/web/static/src/js/views/calendar/calendar_view.js b/addons/web/static/src/js/views/calendar/calendar_view.js
index 232a7316fa5..1b081316f20 100644
--- a/addons/web/static/src/js/views/calendar/calendar_view.js
+++ b/addons/web/static/src/js/views/calendar/calendar_view.js
@@ -105,7 +105,7 @@ var CalendarView = AbstractView.extend({
};
if (fields[fieldName].relation) {
if (['res.users', 'res.partner', 'hr.employee'].indexOf(fields[fieldName].relation) !== -1) {
- filters[fieldName].avatar_field = 'image_64';
+ filters[fieldName].avatar_field = 'image_128';
}
filters[fieldName].avatar_model = fields[fieldName].relation;
}
diff --git a/addons/web/static/src/scss/fields.scss b/addons/web/static/src/scss/fields.scss
index b9f85f2d5c0..e3cba4e3770 100644
--- a/addons/web/static/src/scss/fields.scss
+++ b/addons/web/static/src/scss/fields.scss
@@ -196,6 +196,7 @@
img {
height: 18px;
width: 18px;
+ object-fit: cover;
}
&.o_tag_color_0 {
background-color: #F1F1F1;
diff --git a/addons/web/static/src/scss/kanban_view.scss b/addons/web/static/src/scss/kanban_view.scss
index 18c96fb6171..a46d4632c24 100644
--- a/addons/web/static/src/scss/kanban_view.scss
+++ b/addons/web/static/src/scss/kanban_view.scss
@@ -122,6 +122,7 @@
.oe_kanban_avatar {
width: 20px;
height: 20px;
+ object-fit: cover;
margin-left: 6px;
}
}
diff --git a/addons/web/static/src/scss/ui.scss b/addons/web/static/src/scss/ui.scss
index 9ab1729a4ac..5a46c9c01a8 100644
--- a/addons/web/static/src/scss/ui.scss
+++ b/addons/web/static/src/scss/ui.scss
@@ -91,3 +91,41 @@ span.o_force_ltr {
/*rtl:ignore*/
direction: ltr;
}
+
+// To fill the available space while keeping aspect ratio (crop).
+// Assuming the important part of the image is its center.
+.o_object_fit_cover {
+ object-fit: cover;
+}
+
+.o_image_24_cover {
+ width: 24px;
+ height: 24px;
+ object-fit: cover;
+}
+
+.o_image_40_cover {
+ width: 40px;
+ height: 40px;
+ object-fit: cover;
+}
+
+.o_image_64_cover {
+ width: 64px;
+ height: 64px;
+ object-fit: cover;
+}
+
+// Keep ratio but avoid cropping (so part of the background becomes visible).
+.o_image_64_contain {
+ width: 64px;
+ height: 64px;
+ object-fit: contain;
+}
+
+// When having a square is not necessary, the image will take less space if any
+// of its width or height is smaller than 64px.
+.o_image_64_max {
+ max-width: 64px;
+ max-height: 64px;
+}
diff --git a/addons/web/static/tests/fields/relational_fields_tests.js b/addons/web/static/tests/fields/relational_fields_tests.js
index 7f3f54e3ad7..24ce3e892c8 100644
--- a/addons/web/static/tests/fields/relational_fields_tests.js
+++ b/addons/web/static/tests/fields/relational_fields_tests.js
@@ -1886,7 +1886,7 @@ QUnit.module('relational_fields', {
});
assert.containsN(form, '.o_field_many2manytags.avatar.o_field_widget .badge', 2, "should have 2 records");
- assert.strictEqual(form.$('.o_field_many2manytags.avatar.o_field_widget .badge:first img').data('src'), '/web/image/partner/2/image_64',
+ assert.strictEqual(form.$('.o_field_many2manytags.avatar.o_field_widget .badge:first img').data('src'), '/web/image/partner/2/image_128',
"should have correct avatar image");
form.destroy();
diff --git a/addons/web/tests/test_image.py b/addons/web/tests/test_image.py
index 9d7b1d872e4..0795d78c925 100644
--- a/addons/web/tests/test_image.py
+++ b/addons/web/tests/test_image.py
@@ -19,23 +19,18 @@ class TestImage(HttpCase):
image = Image.open(io.BytesIO(response.content))
self.assertEqual(image.size, (150, 150))
- # CASE: resize placeholder to small
- response = self.url_open('/web/image/fake/0/image_64')
- image = Image.open(io.BytesIO(response.content))
- self.assertEqual(image.size, (64, 64))
-
- # CASE: resize placeholder to medium
+ # CASE: resize placeholder to 128
response = self.url_open('/web/image/fake/0/image_128')
image = Image.open(io.BytesIO(response.content))
self.assertEqual(image.size, (128, 128))
- # CASE: resize placeholder to large
+ # CASE: resize placeholder to 256
response = self.url_open('/web/image/fake/0/image_256')
image = Image.open(io.BytesIO(response.content))
self.assertEqual(image.size, (256, 256))
- # CASE: resize placeholder to big (but placeholder image is too small)
- response = self.url_open('/web/image/fake/0/image')
+ # CASE: resize placeholder to 1024 (but placeholder image is too small)
+ response = self.url_open('/web/image/fake/0/image_1024')
image = Image.open(io.BytesIO(response.content))
self.assertEqual(image.size, (256, 256))
diff --git a/addons/website_blog/models/website_blog.py b/addons/website_blog/models/website_blog.py
index 6a0df40c333..b6e9abbe0ff 100644
--- a/addons/website_blog/models/website_blog.py
+++ b/addons/website_blog/models/website_blog.py
@@ -152,7 +152,7 @@ class BlogPost(models.Model):
create_uid = fields.Many2one('res.users', 'Created by', index=True, readonly=True)
write_date = fields.Datetime('Last Updated on', index=True, readonly=True)
write_uid = fields.Many2one('res.users', 'Last Contributor', index=True, readonly=True)
- author_avatar = fields.Binary(related='author_id.image_64', string="Avatar", readonly=False)
+ author_avatar = fields.Binary(related='author_id.image_128', string="Avatar", readonly=False)
visits = fields.Integer('No of Views', copy=False)
website_id = fields.Many2one(related='blog_id.website_id', readonly=True)
diff --git a/addons/website_blog/static/src/scss/website_blog.scss b/addons/website_blog/static/src/scss/website_blog.scss
index fba33f7d2a9..25ddd75a635 100644
--- a/addons/website_blog/static/src/scss/website_blog.scss
+++ b/addons/website_blog/static/src/scss/website_blog.scss
@@ -147,14 +147,18 @@ $o-wblog-title-sizes-variants: (
.o_wblog_author_avatar {
width: 1.2em;
+ height: 1.2em;
max-width: none;
+ object-fit: cover;
}
.o_wblog_author_avatar_date {
// Resize in order to double the current font-size and accommodate
// two text lines, name and date.
width: 2em;
+ height: 2em;
max-width: none;
+ object-fit: cover;
}
.o_wblog_social_links > a {
diff --git a/addons/website_blog/views/website_blog_views.xml b/addons/website_blog/views/website_blog_views.xml
index 16d585558a2..8ed321d017c 100644
--- a/addons/website_blog/views/website_blog_views.xml
+++ b/addons/website_blog/views/website_blog_views.xml
@@ -137,7 +137,7 @@
<i class="fa fa-clock-o" role="img" aria-label="Post date" title="Post date"/><span t-esc="record.post_date.value"/>
</div>
<div class="col-4 text-right">
- <img t-att-src="kanban_image('res.partner', 'image_64', record.author_id.raw_value)" t-att-title="record.author_id.value" t-att-alt="record.author_id.value" width="24" height="24" class="oe_kanban_avatar"/>
+ <img t-att-src="kanban_image('res.partner', 'image_128', record.author_id.raw_value)" t-att-title="record.author_id.value" t-att-alt="record.author_id.value" class="oe_kanban_avatar o_image_24_cover"/>
</div>
</div>
</div>
diff --git a/addons/website_event_track/views/event_track_views.xml b/addons/website_event_track/views/event_track_views.xml
index b07fed5237a..3bb5605052c 100644
--- a/addons/website_event_track/views/event_track_views.xml
+++ b/addons/website_event_track/views/event_track_views.xml
@@ -44,8 +44,8 @@
</div>
<div class="oe_kanban_bottom_right">
<field name="kanban_state" widget="state_selection" groups="base.group_user"/>
- <img t-att-src="kanban_image('res.partner', 'image_64', record.partner_id.raw_value)"
- t-att-title="record.partner_id.value" t-att-alt="record.partner_id.value" width="24" height="24"
+ <img t-att-src="kanban_image('res.partner', 'image_128', record.partner_id.raw_value)"
+ t-att-title="record.partner_id.value" t-att-alt="record.partner_id.value"
class="oe_kanban_avatar"/>
</div>
</div>
@@ -65,8 +65,8 @@
<calendar date_start="date" date_delay="duration" string="Event Tracks" color="location_id" event_limit="5">
<field name="location_id"/>
<field name="event_id"/>
- <field name="partner_id" avatar_field="image_small"/>
- <field name="user_id" avatar_field="image_small"/>
+ <field name="partner_id" avatar_field="image_128"/>
+ <field name="user_id" avatar_field="image_128"/>
</calendar>
</field>
</record>
diff --git a/addons/website_hr_recruitment/views/website_hr_recruitment_templates.xml b/addons/website_hr_recruitment/views/website_hr_recruitment_templates.xml
index c6b97824cfb..331bd9baff0 100644
--- a/addons/website_hr_recruitment/views/website_hr_recruitment_templates.xml
+++ b/addons/website_hr_recruitment/views/website_hr_recruitment_templates.xml
@@ -424,7 +424,7 @@
<h3 class="mb32 text-center">Your application has been sent to:</h3>
</div>
<div class="col-lg-1 offset-lg-4">
- <p t-field="responsible.image_64" t-options="{'widget': 'image', 'class': 'rounded-circle d-block mx-auto'}"/>
+ <p t-field="responsible.image_128" t-options="{'widget': 'image', 'qweb_img_responsive': False, 'class': 'rounded-circle d-block mx-auto o_image_64_cover'}"/>
</div>
<div class="col-lg-5 o_responsible_data">
<h4 class="mt0" t-field="responsible.name"/>
diff --git a/addons/website_livechat/static/src/xml/thread.xml b/addons/website_livechat/static/src/xml/thread.xml
index b257f5264b3..aaab8703a52 100644
--- a/addons/website_livechat/static/src/xml/thread.xml
+++ b/addons/website_livechat/static/src/xml/thread.xml
@@ -32,7 +32,7 @@
<div class="o_thread_message_sidebar align-self-center">
<div class="o_thread_message_sidebar_image">
<img alt=""
- t-att-src="visitor.partner_id ? '/web/image/res.partner/' + visitor.partner_id + '/image_64' : '/mail/static/src/img/smiley/avatar.jpg'"
+ t-att-src="visitor.partner_id ? '/web/image/res.partner/' + visitor.partner_id + '/image_128' : '/mail/static/src/img/smiley/avatar.jpg'"
class="o_thread_message_avatar rounded-circle"/>
<span>
<i t-if="visitor.is_connected" aria-label="Visitor is connected" class="o_w_visitor_status o_w_visitor_connected fa fa-circle" role="img" title="Online"></i>
diff --git a/addons/website_livechat/views/website_livechat.xml b/addons/website_livechat/views/website_livechat.xml
index 0d1dd069ac0..ff013dc1c44 100644
--- a/addons/website_livechat/views/website_livechat.xml
+++ b/addons/website_livechat/views/website_livechat.xml
@@ -157,16 +157,7 @@
<h3>The Team</h3>
<t t-foreach="team" t-as="user">
<div class="media mt-3">
- <t t-if="user.image_64">
- <t t-if="user.livechat_username">
- <img t-att-src="user.image_64 and image_data_uri(user.image_64) or '/web/static/src/img/placeholder.png'"
- class="rounded o_livechat_operator_avatar" t-att-alt="user.livechat_username"/>
- </t>
- <t t-else="">
- <img t-att-src="user.image_64 and image_data_uri(user.image_64) or '/web/static/src/img/placeholder.png'"
- class="rounded o_livechat_operator_avatar" t-att-alt="user.name"/>
- </t>
- </t>
+ <img t-if="user.image_128" t-att-src="image_data_uri(user.image_128)" class="o_image_64_cover rounded o_livechat_operator_avatar" t-att-alt="user.livechat_username or user.name"/>
<div class="media-body">
<h5>
<t t-if="user.livechat_username">
@@ -225,7 +216,7 @@
<t t-foreach="channels" t-as="channel">
<div t-attf-class="media#{' mt-3' if channel_index else ''}">
<a t-attf-href="/livechat/channel/#{ slug(channel)}">
- <img t-att-src="channel.image_128 and image_data_uri(channel.image_128) or '/web/static/src/img/placeholder.png'" t-att-alt="channel.name" />
+ <img t-att-src="channel.image_128 and image_data_uri(channel.image_128) or '/web/static/src/img/placeholder.png'" t-att-alt="channel.name" class="o_image_64_cover"/>
</a>
<div class="media-body">
<h4><t t-esc="channel.name"/></h4>
diff --git a/addons/website_mail_channel/static/src/css/website_mail_channel.css b/addons/website_mail_channel/static/src/css/website_mail_channel.css
index 27482ebd203..2365860f8fb 100644
--- a/addons/website_mail_channel/static/src/css/website_mail_channel.css
+++ b/addons/website_mail_channel/static/src/css/website_mail_channel.css
@@ -1,8 +1,3 @@
-.o_mg_avatar {
- width: 40px;
- height: 40px;
-}
-
.o_mg_link_show {
display: none;
}
diff --git a/addons/website_mail_channel/views/website_mail_channel_templates.xml b/addons/website_mail_channel/views/website_mail_channel_templates.xml
index d2b6e82a4c9..4b0067fc359 100644
--- a/addons/website_mail_channel/views/website_mail_channel_templates.xml
+++ b/addons/website_mail_channel/views/website_mail_channel_templates.xml
@@ -33,7 +33,7 @@
</div>
<div class="row mt8" t-foreach="groups" t-as="group">
<div class="col-lg-3">
- <img t-att-src="website.image_url(group, 'image_64')" class="float-left" alt="Group"/>
+ <img t-att-src="website.image_url(group, 'image_128')" class="o_image_64_cover float-left" alt="Group"/>
<strong><a t-attf-href="/groups/#{ slug(group) }" t-esc="group.name"/></strong><br />
<t t-if="group.alias_id and group.alias_id.alias_name and group.alias_id.alias_domain">
<i class='fa fa-envelope-o' role="img" aria-label="Alias" title="Alias"/>
@@ -199,7 +199,7 @@
</h4>
</div>
<div class="media">
- <img class="rounded mt0 o_mg_avatar"
+ <img class="rounded mt0 o_image_40_cover"
t-att-src="website.image_url(message, 'author_avatar')" alt="Avatar"/>
<div class="media-body">
<h4 t-esc="message.description"/>
@@ -260,7 +260,7 @@
<div>
<ul class="list-unstyled">
<li t-foreach="messages" t-as="thread" class="media mt-3">
- <img class="rounded mt-0 o_mg_avatar" alt="Avatar"
+ <img class="rounded mt-0 o_image_40_cover" alt="Avatar"
t-att-src="website.image_url(thread, 'author_avatar')"/>
<div class="media-body">
<h4>
diff --git a/addons/website_membership/views/website_membership_templates.xml b/addons/website_membership/views/website_membership_templates.xml
index 3ff095b3123..89cb67ec0d7 100644
--- a/addons/website_membership/views/website_membership_templates.xml
+++ b/addons/website_membership/views/website_membership_templates.xml
@@ -54,8 +54,8 @@
<t t-set="partner" t-value="partners[partner_id]"/>
<div class="media mt-3">
<a t-attf-href="/members/#{slug(partner)}"
- t-field="partner.image_64"
- t-options='{"widget": "image", "class": "media-object mr-3"}'
+ t-field="partner.image_128"
+ t-options='{"widget": "image", "qweb_img_responsive": False, "class": "o_image_64_cover mr-3"}'
></a>
<div class="media-body" style="min-height: 64px;">
<a t-attf-href="/members/#{slug(partner)}">
diff --git a/addons/website_profile/controllers/main.py b/addons/website_profile/controllers/main.py
index aaae098513b..8db95836b9f 100644
--- a/addons/website_profile/controllers/main.py
+++ b/addons/website_profile/controllers/main.py
@@ -73,7 +73,7 @@ class WebsiteProfile(http.Controller):
'/profile/avatar/<int:user_id>',
], type='http', auth="public", website=True, sitemap=False)
def get_user_profile_avatar(self, user_id, field='image_256', width=0, height=0, crop=False, **post):
- if field not in ('image_64', 'image_128', 'image_256'):
+ if field not in ('image_128', 'image_256'):
return werkzeug.exceptions.Forbidden()
can_sudo = self._check_avatar_access(user_id, **post)
diff --git a/addons/website_profile/views/website_profile.xml b/addons/website_profile/views/website_profile.xml
index 40330800585..c36d8dbfccd 100644
--- a/addons/website_profile/views/website_profile.xml
+++ b/addons/website_profile/views/website_profile.xml
@@ -252,7 +252,7 @@
<div class="o_wprofile_sidebar_top d-flex justify-content-between">
<div t-if="user.rank_id" class="d-flex align-items-center">
<small class="font-weight-bold mr-2">Current rank:</small>
- <img t-att-src="website.image_url(user.rank_id, 'image_64')" height="16" alt="" class="mr-1"/>
+ <img t-att-src="website.image_url(user.rank_id, 'image_128')" width="16" height="16" alt="" class="o_object_fit_cover mr-1"/>
<a href="/profile/ranks_badges" t-field="user.rank_id"/>
</div>
<button class="btn btn-sm d-md-none bg-white border" type="button" data-toggle="collapse" data-target="#o_wprofile_sidebar_collapse" aria-expanded="false" aria-controls="o_wprofile_sidebar_collapse">More info</button>
@@ -368,7 +368,7 @@
<div class="card">
<div class="card-body p-2 pr-3">
<div class="media align-items-center">
- <img height="38" t-att-src="website.image_url(badge.badge_id, 'image_64')" class="mr-0"/>
+ <img width="38" height="38" t-att-src="website.image_url(badge.badge_id, 'image_128')" class="o_object_fit_cover mr-0"/>
<div class="media-body col-md-10 p-0">
<h6 class="my-0 text-truncate" t-field="badge.badge_id.name"/>
</div>
@@ -408,7 +408,7 @@
<t t-foreach="ranks" t-as="rank">
<li t-attf-class="list-group-item">
<div class="media align-items-center">
- <img width="40" t-att-src="website.image_url(rank, 'image_64')" class="mr-2" alt="Rank badge"/>
+ <img t-att-src="website.image_url(rank, 'image_128')" class="mr-2 o_image_40_cover" alt="Rank badge"/>
<div class="media-body">
<h5 class="mt-0 mb-0" t-field="rank.name"/>
<span class="badge badge-success"><span t-field="rank.karma_min"/></span> point<span t-if="rank.karma_min">s</span>
@@ -535,7 +535,7 @@
<span t-esc="user['position']"/>
</td>
<td class="align-middle d-none d-sm-table-cell">
- <img class="rounded-circle o_wprofile_img_small" height="30" t-att-src="'/profile/avatar/%s?field=image_128%s' % (user['id'], '&amp;res_model=%s&amp;res_id=%s' % (record._name, record.id) if record else '')"/>
+ <img class="o_object_fit_cover rounded-circle o_wprofile_img_small" width="30" height="30" t-att-src="'/profile/avatar/%s?field=image_128%s' % (user['id'], '&amp;res_model=%s&amp;res_id=%s' % (record._name, record.id) if record else '')"/>
</td>
<td class="align-middle w-md-75">
<span class="font-weight-bold" t-esc="user['name']"/><br/>
diff --git a/addons/website_rating/static/src/js/portal_chatter.js b/addons/website_rating/static/src/js/portal_chatter.js
index bd65e6b339d..c67b82a9974 100644
--- a/addons/website_rating/static/src/js/portal_chatter.js
+++ b/addons/website_rating/static/src/js/portal_chatter.js
@@ -148,7 +148,7 @@ PortalChatter.include({
return {
mes_index: messageIndex,
publisher_id: this.options.partner_id,
- publisher_avatar: _.str.sprintf('/web/image/%s/%s/image_64/50x50', 'res.partner', this.options.partner_id),
+ publisher_avatar: _.str.sprintf('/web/image/%s/%s/image_128/50x50', 'res.partner', this.options.partner_id),
publisher_name: _t("Write your comment"),
publisher_datetime: '',
publisher_comment: '',
@@ -173,7 +173,7 @@ PortalChatter.include({
if (rawRating.publisher_id && rawRating.publisher_id.length >= 2) {
ratingData.publisher_id = rawRating.publisher_id[0];
ratingData.publisher_name = rawRating.publisher_id[1];
- ratingData.publisher_avatar = _.str.sprintf('/web/image/%s/%s/image_64/50x50', 'res.partner', ratingData.publisher_id);
+ ratingData.publisher_avatar = _.str.sprintf('/web/image/%s/%s/image_128/50x50', 'res.partner', ratingData.publisher_id);
}
var commentData = _.extend(this._newPublisherCommentData(messageIndex), ratingData);
return commentData;
diff --git a/addons/website_sale/data/mail_template_data.xml b/addons/website_sale/data/mail_template_data.xml
index 32d57e03bba..b766cdf9b41 100644
--- a/addons/website_sale/data/mail_template_data.xml
+++ b/addons/website_sale/data/mail_template_data.xml
@@ -43,7 +43,7 @@
<table width="100%">
<tr>
<td style="padding: 10px; width:150px;">
- <img src="/web/image/product.product/${line.product_id.id}/image_128" height="100px" width="100px" alt="Product image"></img>
+ <img src="/web/image/product.product/${line.product_id.id}/image_128" style="width: 100px; height: 100px; object-fit: contain;" alt="Product image"></img>
</td>
<td>
<strong>${line.product_id.display_name}</strong><br/>${line.name}
diff --git a/addons/website_sale/static/src/scss/website_sale_frontend.scss b/addons/website_sale/static/src/scss/website_sale_frontend.scss
index c0932d95425..613f247a780 100644
--- a/addons/website_sale/static/src/scss/website_sale_frontend.scss
+++ b/addons/website_sale/static/src/scss/website_sale_frontend.scss
@@ -138,8 +138,3 @@ $o-wsale-wizard-label-completed: $success;
}
}
}
-
-table.js_cart_lines .td-img img {
- // allows sizing the placeholder image to the "image_64" size of 64px
- max-height: 64px;
-} \ No newline at end of file
diff --git a/addons/website_sale/static/src/xml/website_sale_utils.xml b/addons/website_sale/static/src/xml/website_sale_utils.xml
index 000f7118519..f1cf6a40c6a 100644
--- a/addons/website_sale/static/src/xml/website_sale_utils.xml
+++ b/addons/website_sale/static/src/xml/website_sale_utils.xml
@@ -11,8 +11,8 @@
t-att-href="product['website_url']" class="dropdown-item p-2 text-wrap">
<div class="media align-items-center o_search_product_item">
<t t-if="widget.displayImage">
- <img t-attf-src="/web/image/product.template/#{product['id']}/image_64"
- class="flex-shrink-0"/>
+ <img t-attf-src="/web/image/product.template/#{product['id']}/image_128"
+ class="flex-shrink-0 o_image_64_contain"/>
</t>
<div class="media-body px-3">
<t t-set="description" t-value="widget.displayDescription and product['description_sale']"/>
diff --git a/addons/website_sale/tests/test_website_sale_image.py b/addons/website_sale/tests/test_website_sale_image.py
index bda48819247..b4f23b09add 100644
--- a/addons/website_sale/tests/test_website_sale_image.py
+++ b/addons/website_sale/tests/test_website_sale_image.py
@@ -200,17 +200,6 @@ class TestWebsiteSaleImage(odoo.tests.HttpCase):
self.assertEqual(image.size, (128, 72))
self.assertEqual(image.getpixel((image.size[0] / 2, image.size[1] / 2)), jpeg_green, "green")
- # Verify 64 size: keep aspect ratio
- image = Image.open(io.BytesIO(base64.b64decode(template.image_64)))
- self.assertEqual(image.size, (64, 36))
- self.assertEqual(image.getpixel((image.size[0] / 2, image.size[1] / 2)), jpeg_blue, "blue")
- image = Image.open(io.BytesIO(base64.b64decode(product_red.image_64)))
- self.assertEqual(image.size, (64, 40))
- self.assertEqual(image.getpixel((image.size[0] / 2, image.size[1] / 2)), jpeg_red, "red")
- image = Image.open(io.BytesIO(base64.b64decode(product_green.image_64)))
- self.assertEqual(image.size, (64, 36))
- self.assertEqual(image.getpixel((image.size[0] / 2, image.size[1] / 2)), jpeg_green, "green")
-
# self.env.cr.commit() # uncomment to save the product to test in browser
self.start_tour("/", 'shop_zoom', login="admin")
diff --git a/addons/website_sale/views/templates.xml b/addons/website_sale/views/templates.xml
index e6690ef37dd..d0ffa270ff2 100644
--- a/addons/website_sale/views/templates.xml
+++ b/addons/website_sale/views/templates.xml
@@ -581,8 +581,8 @@
<div class="mt16 text-center" style="height: 100%;">
<t t-set="combination_info" t-value="alt_product._get_combination_info()"/>
<t t-set="product_variant" t-value="alt_product.env['product.product'].browse(combination_info['product_id'])"/>
- <div t-if="product_variant" t-field="product_variant.image_64" t-options="{'widget': 'image', 'class': 'rounded shadow o_alternative_product' }" />
- <div t-else="" t-field="alt_product.image_64" t-options="{'widget': 'image', 'class': 'rounded shadow o_alternative_product' }" />
+ <div t-if="product_variant" t-field="product_variant.image_128" t-options="{'widget': 'image', 'qweb_img_responsive': False, 'class': 'rounded shadow o_alternative_product o_image_64_max' }" />
+ <div t-else="" t-field="alt_product.image_128" t-options="{'widget': 'image', 'qweb_img_responsive': False, 'class': 'rounded shadow o_alternative_product o_image_64_max' }" />
<h6>
<a t-att-href="alt_product.website_url" style="display: block">
<span t-att-title="alt_product.name" t-field="alt_product.name" class="o_text_overflow" style="display: block;" />
@@ -851,7 +851,7 @@
<tr t-att-class="'optional_product info' if line.linked_line_id else None">
<td colspan="2" t-if="not line.product_id.product_tmpl_id" class='td-img'></td>
<td align="center" t-if="line.product_id.product_tmpl_id" class='td-img'>
- <span t-field="line.product_id.image_64" t-options="{'widget': 'image', 'class': 'rounded'}" />
+ <span t-field="line.product_id.image_128" t-options="{'widget': 'image', 'qweb_img_responsive': False, 'class': 'rounded o_image_64_max'}" />
</td>
<td t-if="line.product_id.product_tmpl_id" class='td-product_name'>
<div>
@@ -972,7 +972,7 @@
<t t-foreach="website_sale_order.website_order_line" t-as="line">
<div class="row mb8 cart_line">
<div class="col-3 text-center">
- <span t-field="line.product_id.image_64" t-options="{'widget': 'image', 'class': 'rounded'}" />
+ <span t-field="line.product_id.image_128" t-options="{'widget': 'image', 'qweb_img_responsive': False, 'class': 'rounded o_image_64_max mb-2'}" />
</div>
<div class="col-9">
<div>
@@ -1004,9 +1004,9 @@
<tbody>
<tr t-foreach="suggested_products" t-as="product">
<t t-set="combination_info" t-value="product._get_combination_info_variant()"/>
- <td class='td-img'>
+ <td class='td-img text-center'>
<a t-att-href="product.website_url">
- <span t-field="product.image_64" t-options="{'widget': 'image', 'class': 'rounded'}" />
+ <span t-field="product.image_128" t-options="{'widget': 'image', 'qweb_img_responsive': False, 'class': 'rounded o_image_64_max'}" />
</a>
</td>
<td class='td-product_name'>
@@ -1451,7 +1451,7 @@
<tr t-foreach="website_sale_order.website_order_line" t-as="line">
<td class='' colspan="2" t-if="not line.product_id.product_tmpl_id"></td>
<td class='td-img text-center' t-if="line.product_id.product_tmpl_id">
- <span t-field="line.product_id.image_64" t-options="{'widget': 'image', 'class': 'rounded'}" />
+ <span t-field="line.product_id.image_128" t-options="{'widget': 'image', 'qweb_img_responsive': False, 'class': 'rounded o_image_64_max'}" />
</td>
<td class='td-product_name' t-if="line.product_id.product_tmpl_id">
<div>
@@ -1744,7 +1744,7 @@
<div t-ignore="True" class="d-none d-md-block text-center">
<ol t-if="len(product_images) > 1" class="carousel-indicators d-inline-block position-static mx-auto my-0 p-1 text-left">
<t t-foreach="product_images" t-as="product_image"><li t-attf-class="d-inline-block m-1 align-top {{'active' if product_image_first else ''}}" data-target="#o-carousel-product" t-att-data-slide-to="str(product_image_index)">
- <div t-field="product_image.image_64" class="d-flex align-items-center justify-content-center h-100" t-options='{"widget": "image", "alt-field": "name"}'/>
+ <div t-field="product_image.image_128" t-options='{"widget": "image", "qweb_img_responsive": False, "class": "o_image_64_contain", "alt-field": "name"}'/>
<i t-if="product_image._name == 'product.image' and product_image.embed_code" class="fa fa-2x fa-play-circle-o o_product_video_thumb"/>
</li></t>
</ol>
diff --git a/addons/website_sale_comparison/static/src/scss/website_sale_comparison.scss b/addons/website_sale_comparison/static/src/scss/website_sale_comparison.scss
index 48aa1a9a887..204d9d1b69d 100644
--- a/addons/website_sale_comparison/static/src/scss/website_sale_comparison.scss
+++ b/addons/website_sale_comparison/static/src/scss/website_sale_comparison.scss
@@ -53,5 +53,13 @@
div.css_not_available .o_add_compare_dyn {
display: none;
}
+
+ .o_comparelist_remove {
+ @include o-position-absolute($top: 0, $right: 0.5rem);
+ }
+
+ .o_ws_compare_image {
+ vertical-align: middle;
+ }
}
diff --git a/addons/website_sale_comparison/static/tests/tours/website_sale_comparison.js b/addons/website_sale_comparison/static/tests/tours/website_sale_comparison.js
index 0dc5bfb88b6..ad39d4006bf 100644
--- a/addons/website_sale_comparison/static/tests/tours/website_sale_comparison.js
+++ b/addons/website_sale_comparison/static/tests/tours/website_sale_comparison.js
@@ -129,12 +129,8 @@ odoo.define('website_sale_comparison.tour_comparison', function (require) {
run: function () {},
},
{
- content: "remove one product from compare table",
- trigger: '#o_comparelist_table',
- run: function () {
- // the content of the link is just a float, and the tour manager considers it invisible
- $('#o_comparelist_table td:contains("Customizable Desk (Steel, Black)") .o_comparelist_remove').click();
- },
+ content: "remove Customizable Desk (Steel, Black) from compare table",
+ trigger: '#o_comparelist_table .o_comparelist_remove:eq(2)',
},
{
content: "check customizable table with black variant is removed",
diff --git a/addons/website_sale_comparison/views/website_sale_comparison_template.xml b/addons/website_sale_comparison/views/website_sale_comparison_template.xml
index 6233bed257b..e29c0f3e1a3 100644
--- a/addons/website_sale_comparison/views/website_sale_comparison_template.xml
+++ b/addons/website_sale_comparison/views/website_sale_comparison_template.xml
@@ -104,32 +104,39 @@
<table class="table table-bordered table-hover text-center mt16 table-comparator" id="o_comparelist_table">
<t t-set="categories" t-value="products._prepare_categories_for_display()"/>
<thead>
- <td t-if="len(categories)" class='td-top-left'/>
- <td t-foreach="products" t-as="product">
- <t t-set="combination_info" t-value="product._get_combination_info_variant()"/>
- <a href="#" t-att-data-product_product_id="product.id" class="o_comparelist_remove" t-if="len(products) &gt; 2">
- <strong class='float-right'>x</strong>
- </a>
- <a t-att-href="product.website_url">
- <img t-attf-src="/web/image/product.product/#{product.id}/image_256" class="img img-fluid" style="margin:auto;" alt="Product image"/>
- </a>
- <div class='product_summary'>
- <a class="o_product_comparison_table" t-att-href="product.website_url">
- <span t-esc="combination_info['display_name']"></span><br/>
+ <tr>
+ <td t-if="len(categories)" class='o_ws_compare_image td-top-left border-bottom-0'/>
+ <td t-foreach="products" t-as="product" class="o_ws_compare_image position-relative border-bottom-0">
+ <a href="#" t-att-data-product_product_id="product.id" class="o_comparelist_remove" t-if="len(products) &gt; 2">
+ <strong>x</strong>
</a>
+ <a t-att-href="product.website_url">
+ <img t-attf-src="/web/image/product.product/#{product.id}/image_256" class="img img-fluid" style="margin:auto;" alt="Product image"/>
+ </a>
+ </td>
+ </tr>
+ <tr>
+ <td t-if="len(categories)" class='td-top-left border-top-0'/>
+ <td t-foreach="products" t-as="product" class="border-top-0">
+ <t t-set="combination_info" t-value="product._get_combination_info_variant()"/>
+ <div class='product_summary'>
+ <a class="o_product_comparison_table" t-att-href="product.website_url">
+ <span t-esc="combination_info['display_name']"></span><br/>
+ </a>
- <span>
- <strong>Price:</strong>
- <del t-attf-class="text-danger mr8 {{'' if combination_info['has_discounted_price'] else 'd-none'}}" style="white-space: nowrap;" t-esc="combination_info['list_price']" t-options="{'widget': 'monetary', 'display_currency': website.currency_id}" />
- <span t-esc="combination_info['price']" t-options="{'widget': 'monetary', 'display_currency': website.currency_id}"></span>
- </span>
+ <span>
+ <strong>Price:</strong>
+ <del t-attf-class="text-danger mr8 {{'' if combination_info['has_discounted_price'] else 'd-none'}}" style="white-space: nowrap;" t-esc="combination_info['list_price']" t-options="{'widget': 'monetary', 'display_currency': website.currency_id}" />
+ <span t-esc="combination_info['price']" t-options="{'widget': 'monetary', 'display_currency': website.currency_id}"></span>
+ </span>
- <form action="/shop/cart/update" method="post" class="text-center">
- <input name="product_id" t-att-value="product.id" type="hidden"/>
- <a role="button" class="btn btn-primary btn-block a-submit" href="#"><i class="fa fa-shopping-cart"></i>&amp;nbsp;Add to Cart</a>
- </form>
- </div>
- </td>
+ <form action="/shop/cart/update" method="post" class="text-center">
+ <input name="product_id" t-att-value="product.id" type="hidden"/>
+ <a role="button" class="btn btn-primary btn-block a-submit" href="#"><i class="fa fa-shopping-cart"></i>&amp;nbsp;Add to Cart</a>
+ </form>
+ </div>
+ </td>
+ </tr>
</thead>
<tbody>
<t t-foreach="categories" t-as="category">
@@ -157,9 +164,9 @@
<template id="product_product" name="Comparator - Product row in comparator popover">
<t t-set="combination_info" t-value="product._get_combination_info_variant()"/>
- <div class="row no-gutters align-items-center mt-2 o_product_row" t-att-data-category_ids="product.public_categ_ids.ids">
- <div class="col-3">
- <img class="img img-fluid" t-att-src="website.image_url(product, 'image_64')" style="max-height: 50px;" alt="Product image"/>
+ <div class="row no-gutters align-items-center my-1 o_product_row" t-att-data-category_ids="product.public_categ_ids.ids">
+ <div class="col-3 text-center">
+ <img class="img o_image_64_max" t-att-src="website.image_url(product, 'image_128')" alt="Product image"/>
</div>
<div class="col-8 pl-2">
<h6>
diff --git a/addons/website_sale_coupon/views/website_sale_templates.xml b/addons/website_sale_coupon/views/website_sale_templates.xml
index e1f91e25200..50ae43b1b84 100644
--- a/addons/website_sale_coupon/views/website_sale_templates.xml
+++ b/addons/website_sale_coupon/views/website_sale_templates.xml
@@ -8,9 +8,9 @@
</template>
<template id="website_sale_coupon_cart_hide_qty" inherit_id="website_sale.cart_lines">
<xpath expr="//td[hasclass('td-img')]/span" position="replace">
- <t t-if="line.is_reward_line and line.sudo().product_id.image_64">
+ <t t-if="line.is_reward_line and line.sudo().product_id.image_128">
<span>
- <img t-att-src="image_data_uri(line.sudo().product_id.image_64)" class="img img-fluid rounded" t-att-alt="line.name_short"/>
+ <img t-att-src="image_data_uri(line.sudo().product_id.image_128)" class="img o_image_64_max rounded" t-att-alt="line.name_short"/>
</span>
</t>
<t t-else="">
@@ -36,9 +36,9 @@
</template>
<template id="cart_popover" inherit_id="website_sale.cart_popover" name="Cart Popover">
<xpath expr="//div[hasclass('cart_line')]/div[1]/span" position="replace">
- <t t-if="line.is_reward_line and line.sudo().product_id.image_64">
+ <t t-if="line.is_reward_line and line.sudo().product_id.image_128">
<span>
- <img t-att-src="image_data_uri(line.sudo().product_id.image_64)" class="img img-fluid rounded" t-att-alt="line.name_short"/>
+ <img t-att-src="image_data_uri(line.sudo().product_id.image_128)" class="img o_image_64_max rounded" t-att-alt="line.name_short"/>
</span>
</t>
<t t-else="">
diff --git a/addons/website_slides/controllers/main.py b/addons/website_slides/controllers/main.py
index 669633fb66c..cefc1411f84 100644
--- a/addons/website_slides/controllers/main.py
+++ b/addons/website_slides/controllers/main.py
@@ -580,7 +580,7 @@ class WebsiteSlides(WebsiteProfile):
@http.route('/slides/slide/<int:slide_id>/get_image', type='http', auth="public", website=True, sitemap=False)
def slide_get_image(self, slide_id, field='image_128', width=0, height=0, crop=False):
# Protect infographics by limiting access to 256px (large) images
- if field not in ('image_64', 'image_128', 'image_256', 'image_512', 'image_1024', 'image_1920'):
+ if field not in ('image_128', 'image_256', 'image_512', 'image_1024', 'image_1920'):
return werkzeug.exceptions.Forbidden()
slide = request.env['slide.slide'].sudo().browse(slide_id).exists()
diff --git a/addons/website_slides/views/slide_slide_views.xml b/addons/website_slides/views/slide_slide_views.xml
index 922a2b3fec0..423f3631767 100644
--- a/addons/website_slides/views/slide_slide_views.xml
+++ b/addons/website_slides/views/slide_slide_views.xml
@@ -161,13 +161,13 @@
t-attf-style="background-image:url('#{kanban_image('slide.slide', 'image_128', record.id.raw_value, placeholder)}')">
<img class="o_kanban_image_inner_pic"
t-att-alt="record.channel_id.value"
- t-att-src="kanban_image('slide.channel', 'image_64', record.channel_id.raw_value)"/>
+ t-att-src="kanban_image('slide.channel', 'image_128', record.channel_id.raw_value)"/>
</div>
<div class="o_kanban_image rounded-circle d-md-none"
t-attf-style="background-image:url('#{kanban_image('slide.slide', 'image_128', record.id.raw_value, placeholder)}')">
<img class="o_kanban_image_inner_pic"
t-att-alt="record.channel_id.value"
- t-att-src="kanban_image('slide.channel', 'image_64', record.channel_id.raw_value)"/>
+ t-att-src="kanban_image('slide.channel', 'image_128', record.channel_id.raw_value)"/>
</div>
<div class="oe_kanban_details d-flex flex-column">
<strong class="o_kanban_record_title oe_partner_heading"><field name="display_name"/></strong>
@@ -203,7 +203,7 @@
<t t-else=""><i class="fa fa-file-pdf-o mr-2" aria-label="Document" role="img" title="Document"/></t>
<field name="slide_type"/>
</span>
- <img t-att-src="kanban_image('res.users', 'image_64', record.user_id.raw_value)" t-att-title="record.user_id.value" t-att-alt="record.user_id.value" width="24" height="24" class="oe_kanban_avatar"/>
+ <img t-att-src="kanban_image('res.users', 'image_128', record.user_id.raw_value)" t-att-title="record.user_id.value" t-att-alt="record.user_id.value" class="oe_kanban_avatar o_image_24_cover"/>
</div>
</div>
</div>
diff --git a/addons/website_slides/views/website_slides_templates_homepage.xml b/addons/website_slides/views/website_slides_templates_homepage.xml
index e651d70722b..ee02cf895cf 100644
--- a/addons/website_slides/views/website_slides_templates_homepage.xml
+++ b/addons/website_slides/views/website_slides_templates_homepage.xml
@@ -429,7 +429,7 @@
<div class="o_wslides_home_aside">
<div t-if="user.rank_id" class="d-flex align-items-center">
<span class="font-weight-bold text-muted mr-2">Current rank:</span>
- <img t-att-src="website.image_url(user.rank_id, 'image_64')" height="16" alt="" class="mr-1"/>
+ <img t-att-src="website.image_url(user.rank_id, 'image_128')" width="16" height="16" alt="" class="o_object_fit_cover mr-1"/>
<a href="/profile/ranks_badges" t-field="user.rank_id"/>
</div>
<t t-set="next_rank_id" t-value="user._get_next_rank()"/>