From 89c1d81b24ad64e7eca6803dd4e5e6e21025ae17 Mon Sep 17 00:00:00 2001
From: Aaron Bohy <aab@odoo.com>
Date: Wed, 29 Apr 2020 07:21:52 +0000
Subject: [PATCH] [IMP] *: update form views

*account,purchase,sale

Make them use widget mail_many2one_avatar.

Part of task 2195254

closes odoo/odoo#49345

Related: odoo/enterprise#10074
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
---
 addons/account/views/account_move_views.xml | 2 +-
 addons/purchase/views/purchase_views.xml    | 2 +-
 addons/sale/views/sale_views.xml            | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/addons/account/views/account_move_views.xml b/addons/account/views/account_move_views.xml
index 0e02b040f89f..550d9f30e0db 100644
--- a/addons/account/views/account_move_views.xml
+++ b/addons/account/views/account_move_views.xml
@@ -995,7 +995,7 @@
                                            attrs="{'invisible': [('move_type', 'not in', ('out_invoice', 'out_refund'))]}">
                                         <label for="ref" string="Customer Reference" />
                                         <field name="ref" nolabel="1"/>
-                                        <field name="invoice_user_id" domain="[('share', '=', False)]"/>
+                                        <field name="invoice_user_id" domain="[('share', '=', False)]" widget="many2one_avatar_user"/>
                                         <field name="invoice_origin" string="Source Document" force_save="1"
                                                attrs="{'invisible': [('invoice_origin', '=', False)]}"/>
                                         <field name="partner_bank_id"
diff --git a/addons/purchase/views/purchase_views.xml b/addons/purchase/views/purchase_views.xml
index cb38edc705ee..100a13e78a29 100644
--- a/addons/purchase/views/purchase_views.xml
+++ b/addons/purchase/views/purchase_views.xml
@@ -348,7 +348,7 @@
                                     </div>
                                 </group>
                                 <group name="other_info">
-                                    <field name="user_id" domain="[('share', '=', False)]"/>
+                                    <field name="user_id" domain="[('share', '=', False)]" widget="many2one_avatar_user"/>
                                     <field name="invoice_status" attrs="{'invisible': [('state', 'in', ('draft', 'sent', 'to approve', 'cancel'))]}"/>
                                     <field name="payment_term_id" attrs="{'readonly': ['|', ('invoice_status','=', 'invoiced'), ('state', '=', 'done')]}" options="{'no_create': True}"/>
                                     <field name="fiscal_position_id" options="{'no_create': True}" attrs="{'readonly': ['|', ('invoice_status','=', 'invoiced'), ('state', '=', 'done')]}"/>
diff --git a/addons/sale/views/sale_views.xml b/addons/sale/views/sale_views.xml
index be49874e70bf..f72b54c90f0e 100644
--- a/addons/sale/views/sale_views.xml
+++ b/addons/sale/views/sale_views.xml
@@ -657,7 +657,7 @@
                         <page string="Other Info" name="other_information">
                             <group>
                                 <group name="sales_person" string="Sales">
-                                    <field name="user_id" domain="[('share', '=', False)]"/>
+                                    <field name="user_id" domain="[('share', '=', False)]" widget="many2one_avatar_user"/>
                                     <field name="team_id" kanban_view_ref="%(sales_team.crm_team_view_kanban)s" options="{'no_create': True}"/>
                                     <field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/>
                                     <field name="require_signature"/>
-- 
GitLab