diff --git a/models/res_partner.py b/models/res_partner.py index 20bd90e107178764dfc59b4d06d59f448dd60105..e555953f7ad9edc8728d7735f5e67b1141b5947f 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 8b6aa666e6abc14a25940e25197777d3578874e2..a239dd9c9ea9cdb4ba779e21aee71d58bf042360 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'))]}"/>