From c22165522a7b4cd01c805a7a6c53e3be5d7d2a68 Mon Sep 17 00:00:00 2001
From: Benjamin <benjamin@le-filament.com>
Date: Wed, 29 Apr 2020 18:23:39 +0200
Subject: [PATCH] =?UTF-8?q?[update]=20contact=20associ=C3=A9=20au=20code?=
 =?UTF-8?q?=20activit=C3=A9=20=3D=20personnes=20morales=20et=20appartenant?=
 =?UTF-8?q?=20=C3=A0=20l'UR?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 views/hr_timesheet_cgscop.xml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/views/hr_timesheet_cgscop.xml b/views/hr_timesheet_cgscop.xml
index 1af92c4..3a6aa23 100644
--- a/views/hr_timesheet_cgscop.xml
+++ b/views/hr_timesheet_cgscop.xml
@@ -4,7 +4,7 @@
 
 <odoo>
     <data>
-        
+
         <!-- Form View Project CG -->
         <record id="view_cgscop_project_timesheet_form" model="ir.ui.view">
             <field name="name">cgscop.project.timesheet.form</field>
@@ -28,7 +28,7 @@
                         </div>
                         <group>
                             <group>
-                                <field name="partner_id" string="Contact par défaut" help="Contact par défaut auquel est rattaché cette activité. Ce contact sera sélectionné automatiquement dans les feuilles de temps" options="{'no_open': True, 'no_create': True}"/>
+                                <field name="partner_id" string="Contact par défaut" domain="[('is_company', '=', True), ('ur_id', '=', ur_id)]" help="Contact par défaut auquel est rattaché cette activité. Ce contact sera sélectionné automatiquement dans les feuilles de temps" options="{'no_open': True, 'no_create': True}"/>
                                 <field name="ur_id" string="Union Régionale" options="{'no_open': True, 'no_create': True}" required="1" />
                                 <field name="company_id" groups="base.group_multi_company" options="{'no_open': True, 'no_create': True}" string="Société" invisible="1" />
                             </group>
@@ -154,4 +154,4 @@
             groups="cgscop_partner.group_ur_list_modif,cgscop_partner.group_cg_administrator"/>
 
     </data>
-</odoo>
\ No newline at end of file
+</odoo>
-- 
GitLab