From b948adef4ca9dc2f59f5f150aad8413e8cc0e31f Mon Sep 17 00:00:00 2001 From: Benjamin <benjamin@le-filament.com> Date: Wed, 27 May 2020 16:53:28 +0200 Subject: [PATCH] =?UTF-8?q?[cgscop=20#199]=20ajout=20d=C3=A9l=C3=A9gu?= =?UTF-8?q?=C3=A9=20en=20support?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- models/res_partner.py | 6 ++++++ views/res_partner.xml | 1 + 2 files changed, 7 insertions(+) diff --git a/models/res_partner.py b/models/res_partner.py index 20bd90e..e555953 100644 --- a/models/res_partner.py +++ b/models/res_partner.py @@ -118,6 +118,12 @@ class ScopPartner(models.Model): domain=[('active', '=', True)], on_delete='restrict', track_visibility='onchange') + support_delegate_id = fields.Many2one( + 'res.users', + string='Délégué en support', + domain=[('active', '=', True)], + on_delete='restrict', + track_visibility='onchange') segment_1_id = fields.Many2many('res.partner.segment1', column1='partner_id', column2='segment_id', diff --git a/views/res_partner.xml b/views/res_partner.xml index 8b6aa66..a239dd9 100644 --- a/views/res_partner.xml +++ b/views/res_partner.xml @@ -358,6 +358,7 @@ <field name="creation_delegate_id" widget="res_partner_many2one" attrs="{'required':[('project_status','in',('3_accompagnement','4_adhesion', '5_cg'))], 'invisible':[('project_status', 'in', '6_suivi')]}" options="{'no_open': True, 'no_create': True}" domain="[('ur_id', '=', ur_id)]"/> <field name="followup_delegate_id" widget="res_partner_many2one" options="{'no_open': True, 'no_create': True}" domain="[('active', '=', True),('ur_id', '=', ur_id)]" attrs="{'invisible': [('project_status', 'in', ('1_information', '2_pre-diagnostic', '3_accompagnement'))]}"/> + <field name="support_delegate_id" widget="res_partner_many2one" options="{'no_open': True, 'no_create': True}" domain="[('active', '=', True),('ur_id', '=', ur_id)]" /> <field name="segment_1_id" widget="many2many_tags" options="{'color_field': 'color', 'no_create': True}" domain="[('ur_id', '=', ur_id)]" attrs="{'invisible': [('project_status', 'in', ('1_information'))]}"/> <field name="segment_2_id" widget="many2many_tags" options="{'color_field': 'color', 'no_create': True}" domain="[('ur_id', '=', ur_id)]" attrs="{'invisible': [('project_status', 'in', ('1_information'))]}"/> <field name="segment_3_id" widget="many2many_tags" options="{'color_field': 'color', 'no_create': True}" domain="[('ur_id', '=', ur_id)]" attrs="{'invisible': [('project_status', 'in', ('1_information'))]}"/> -- GitLab