From 31c82c74b80949105a5ab20cf279386befbc1817 Mon Sep 17 00:00:00 2001
From: Remi <remi@le-filament.com>
Date: Mon, 9 Dec 2019 16:30:50 +0100
Subject: [PATCH] =?UTF-8?q?Afficher=20code=20activit=C3=A9=20UR=20dans=20t?=
 =?UTF-8?q?ree=20view=20=C3=A0=20la=20place=20de=20projet?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 views/hr_expense.xml | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/views/hr_expense.xml b/views/hr_expense.xml
index 2ea543b..5c02341 100644
--- a/views/hr_expense.xml
+++ b/views/hr_expense.xml
@@ -11,8 +11,9 @@
             <field name="model">hr.expense</field>
             <field name="inherit_id" ref="hr_expense.view_expenses_tree"/>
             <field name="arch" type="xml">
-                <field name="analytic_account_id" position="replace">
-                    <field name="analytic_account_id" options="{'no_open': True, 'no_create': True}" string="Code Activité"/>
+                <field name="analytic_account_id" position="attributes" options="{'no_open': True, 'no_create': True}">
+                    <attribute name="string">Code activité UR</attribute>
+                    <attribute name="groups"></attribute>
                 </field>
             </field>
         </record>
@@ -68,6 +69,7 @@
                     <attribute name="groups"></attribute>
                     <attribute name="readonly">True</attribute>
                     <attribute name="options">{'no_open': True, 'no_create': True}</attribute>
+                    <attribute name="attrs">{'invisible': [('timesheet_id', '=', False)]}</attribute>
                 </field>
                 <field name="analytic_account_id" position="after">
                     <field name="coop_id" attrs="{'invisible': [('timesheet_id', '=', False)]}" readonly="True"  options="{'no_open': True, 'no_create': True}" />
-- 
GitLab