diff options
| author | Vishnu Thuletiya <vtu@odoo.com> | 2020-05-06 06:21:14 +0000 |
|---|---|---|
| committer | Barad Mahendra <mba@openerp.com> | 2020-05-13 12:37:48 +0000 |
| commit | 9a830432dbdf678c732ebe6e91135dad5ff2e6d2 (patch) | |
| tree | 54596a0d2567c75fcd37f719e8707db18031f832 /addons/maintenance | |
| parent | 25cb4c18e5f49b83014f6b1abf63044a6ab6c2cf (diff) | |
[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>
Diffstat (limited to 'addons/maintenance')
| -rw-r--r-- | addons/maintenance/views/maintenance_views.xml | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/addons/maintenance/views/maintenance_views.xml b/addons/maintenance/views/maintenance_views.xml index 7bf76102ef7..1dc661d9c94 100644 --- a/addons/maintenance/views/maintenance_views.xml +++ b/addons/maintenance/views/maintenance_views.xml @@ -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> |
