diff --git a/views/hr_timesheet_cgscop.xml b/views/hr_timesheet_cgscop.xml index 1af92c4b3672d811c606d5b02b00b1d97043cebd..3a6aa23db8fb3608f0e7796f5d4917f6f9252d61 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>