[IMP] various: Use the new avatar widget in kanban view
The purpose of task is to update the 'user/employee avatar' to the new widget in all the kanban view across all modules. The below new widget are introduced for avatar: - many2one_avatar_user (for user_id fields) - many2one_avatar_employee (for employee_id fields) which displays the avatar (i.e. picture) of a user/employee in front of his name and clicking on the avatar will open a chatbox to message that specific user/employee. So in this commit, For each kanban view with a user or employee avatar, replaced it by the field with the new 'many2one_avatar' widget. TaskID: 2244928 Related Enterprise PR: https://github.com/odoo/enterprise/pull/10420 closes odoo/odoo#50789 Closes: #50789 Related: odoo/enterprise#10420 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
This commit is contained in:
committed by
Barad Mahendra
parent
25cb4c18e5
commit
9a830432db
@@ -59,14 +59,13 @@
|
||||
<div t-attf-class="oe_kanban_card oe_kanban_global_click">
|
||||
<div>
|
||||
<strong><span><field name="analytic_id"/></span></strong>
|
||||
<img t-if="record.user_id.raw_value"
|
||||
t-att-title="record.user_id.value"
|
||||
t-att-src="kanban_image('res.users', 'image_128', record.user_id.raw_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>
|
||||
<div t-if="record.partner_id.value"><strong>Customer</strong> <field name="partner_id"/> </div>
|
||||
<div class="float-right">
|
||||
<field name="user_id" widget="many2one_avatar_user"/>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</templates>
|
||||
|
||||
@@ -385,9 +385,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="oe_kanban_bottom_right">
|
||||
<img t-if="record.user_id.raw_value"
|
||||
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"/>
|
||||
<field name="user_id" widget="many2one_avatar_user"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -18,11 +18,5 @@
|
||||
.o_event_fontsize_20 {
|
||||
font-size: 2rem;
|
||||
}
|
||||
|
||||
.o_event_fit_20 {
|
||||
height: 20px;
|
||||
object-fit: cover;
|
||||
width: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -362,10 +362,9 @@
|
||||
<div class="text-right">
|
||||
<div class="float-left"><field name="activity_ids" widget="kanban_activity"/></div>
|
||||
<field name="kanban_state" widget="state_selection"/>
|
||||
<img t-if="record.user_id.raw_value"
|
||||
class="oe_kanban_avatar o_event_fit_20 ml-2 rounded-circle"
|
||||
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"/>
|
||||
<span class="ml-2">
|
||||
<field name="user_id" widget="many2one_avatar_user"/>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -278,7 +278,9 @@
|
||||
<field name="job_id"/>
|
||||
</div>
|
||||
<div class="oe_kanban_bottom_right">
|
||||
<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="24" height="24" class="oe_kanban_avatar float-right"/>
|
||||
<span class="float-right">
|
||||
<field name="employee_id" widget="many2one_avatar_employee"/>
|
||||
</span>
|
||||
<span class="float-right mr4">
|
||||
<field name="kanban_state" widget="state_selection"/>
|
||||
</span>
|
||||
|
||||
@@ -98,12 +98,8 @@
|
||||
<field name="employee_id"/>
|
||||
<field name="department_id"/>
|
||||
</xpath>
|
||||
<xpath expr="//img[@t-att-title='record.owner_user_id.value']" position='replace'>
|
||||
<img t-if="record.employee_id.raw_value"
|
||||
class="oe_kanban_avatar"
|
||||
t-att-alt="record.employee_id.value"
|
||||
t-att-title="record.employee_id.value"
|
||||
t-att-src="kanban_image('hr.employee', 'image_128', record.employee_id.raw_value)"/>
|
||||
<xpath expr="//field[@name='owner_user_id']" position='replace'>
|
||||
<field name="employee_id" widget="many2one_avatar_employee"/>
|
||||
</xpath>
|
||||
<div t-if="record.serial_no.raw_value" position='after'>
|
||||
<div t-if="!record.employee_id.raw_value">Unassigned</div>
|
||||
|
||||
@@ -331,10 +331,7 @@
|
||||
<field name="legend_blocked" invisible="1"/>
|
||||
<field name="legend_done" invisible="1"/>
|
||||
</div>
|
||||
<img t-if="record.user_id.raw_value"
|
||||
t-att-title="record.user_id.value"
|
||||
t-att-src="kanban_image('res.users', 'image_128', record.user_id.raw_value)"
|
||||
t-att-alt="record.user_id.value" class="oe_kanban_avatar"/>
|
||||
<field name="user_id" widget="many2one_avatar_user"/>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -106,7 +106,9 @@
|
||||
<t t-esc="record.date.value"/>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<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 class="float-right">
|
||||
<field name="user_id" widget="many2one_avatar_user"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -77,7 +77,9 @@
|
||||
<t t-esc="record.date.value"/>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<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 class="float-right">
|
||||
<field name="user_id" widget="many2one_avatar_user"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -91,7 +91,9 @@
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<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"/>
|
||||
<span class="float-right">
|
||||
<field name="user_id" widget="many2one_avatar_user"/>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -164,10 +164,7 @@
|
||||
</div>
|
||||
<div class="oe_kanban_bottom_right">
|
||||
<field name="kanban_state" widget="state_selection"/>
|
||||
<img t-if="record.user_id.raw_value"
|
||||
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"/>
|
||||
<field name="user_id" widget="many2one_avatar_user"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -471,10 +468,7 @@
|
||||
<div class="o_kanban_inline_block" t-if="!selection_mode">
|
||||
<field name="activity_ids" widget="kanban_activity" />
|
||||
</div>
|
||||
<img t-if="record.owner_user_id.raw_value"
|
||||
t-att-title="record.owner_user_id.value"
|
||||
t-att-src="kanban_image('res.users', 'image_128', record.owner_user_id.raw_value)"
|
||||
t-att-alt="record.owner_user_id.value" class="oe_kanban_avatar"/>
|
||||
<field name="owner_user_id" widget="many2one_avatar_user"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -666,11 +660,6 @@
|
||||
<div t-attf-class="oe_kanban_global_click">
|
||||
<div class="mb4">
|
||||
<strong><field name="name"/></strong>
|
||||
<img t-if="record.technician_user_id.raw_value"
|
||||
t-att-alt="record.technician_user_id.value"
|
||||
t-att-title="record.technician_user_id.value"
|
||||
t-att-src="kanban_image('res.users', 'image_128', record.technician_user_id.raw_value)"
|
||||
class="oe_kanban_avatar o_image_24_cover float-right"/>
|
||||
</div>
|
||||
<div class="row mt4">
|
||||
<div class="col-6">
|
||||
@@ -682,6 +671,7 @@
|
||||
<span class="badge badge-pill">
|
||||
<strong>Maintenance:</strong> <field name="maintenance_count"/>
|
||||
</span>
|
||||
<field name="technician_user_id" widget="many2one_avatar_user"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -368,11 +368,7 @@
|
||||
</span>
|
||||
</div>
|
||||
<div class="oe_kanban_bottom_right">
|
||||
<img t-if="record.user_id.raw_value"
|
||||
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"/>
|
||||
<field name="user_id" widget="many2one_avatar_user"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -117,13 +117,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="text-align:right;" t-if="record.current_user_id.value">
|
||||
<img
|
||||
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"
|
||||
/>
|
||||
<div style="text-align:right;">
|
||||
<field name="current_user_id" widget="many2one_avatar_user"/>
|
||||
</div>
|
||||
</div><div class="container o_kanban_card_manage_pane dropdown-menu" role="menu">
|
||||
<div class="row">
|
||||
|
||||
@@ -174,7 +174,7 @@
|
||||
<span><field name="start_at" /></span>
|
||||
</div>
|
||||
<div class="oe_kanban_bottom_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"/>
|
||||
<field name="user_id" widget="many2one_avatar_user"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -435,11 +435,8 @@
|
||||
<field name="partner_id" string="Contact"/>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="oe_kanban_bottom_right">
|
||||
<img t-if="record.user_id.raw_value"
|
||||
t-att-title="record.user_id.value"
|
||||
t-att-src="kanban_image('res.users', 'image_128', record.user_id.raw_value)"
|
||||
t-att-alt="record.user_id.value" class="oe_kanban_avatar o_image_24_cover float-right"/>
|
||||
<div class="oe_kanban_bottom_right float-right">
|
||||
<field name="user_id" widget="many2one_avatar_user"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -234,10 +234,7 @@
|
||||
<field name="vendor_id"/>
|
||||
</div>
|
||||
<div class="oe_kanban_bottom_right">
|
||||
<img t-if="record.user_id.raw_value"
|
||||
t-att-title="record.user_id.value"
|
||||
t-att-src="kanban_image('res.users', 'image_128', record.user_id.raw_value)"
|
||||
t-att-alt="record.user_id.value" class="oe_kanban_avatar float-right"/>
|
||||
<field name="user_id" widget="many2one_avatar_user"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
<div class="o_kanban_record_bottom h5 mt-2 mb-0">
|
||||
<div id="utm_statistics" class="d-flex flex-grow-1 text-600 mt-1"/>
|
||||
<div class="oe_kanban_bottom_right">
|
||||
<img t-att-src="kanban_image('res.users', 'image_128', record.user_id.raw_value)" t-att-data-member_id="record.user_id.raw_value" t-att-alt="record.user_id.raw_value" width="32" height="32" class="oe_kanban_avatar"/>
|
||||
<field name="user_id" widget="many2one_avatar_user"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -224,10 +224,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-if="record.user_id.raw_value"
|
||||
t-att-title="record.user_id.value"
|
||||
t-att-src="kanban_image('res.users', 'image_128', record.user_id.raw_value)"
|
||||
t-att-alt="record.user_id.value" class="oe_kanban_avatar o_image_24_cover"/>
|
||||
<field name="user_id" widget="many2one_avatar_user"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user