diff --git a/models/res_partner.py b/models/res_partner.py index acacca2cb209df853f5938b998a0b0910c470e6b..8942253b851e57acb8d2f9031ceb15f8838cccb6 100644 --- a/models/res_partner.py +++ b/models/res_partner.py @@ -188,6 +188,9 @@ class ScopPartner(models.Model): certification_ids = fields.Many2many( comodel_name='res.partner.certification', string='Agrément', on_delete='restrict') + other_certification = fields.Char( + string='Autre agrément', + required=False) siret = fields.Char(string='SIRET', size=14, index=True, track_visibility='onchange') formatted_siret = fields.Char(string='SIRET formaté', diff --git a/views/res_partner.xml b/views/res_partner.xml index efb22b095d9a1684af1305a6f104518a462d814a..5741ee967cee93761d6e92b23b79b64f45ecc1f2 100644 --- a/views/res_partner.xml +++ b/views/res_partner.xml @@ -130,6 +130,7 @@ <field name="organization_subtype_id" attrs="{'invisible': ['|', ('is_company','=', False), ('type', '!=', 'contact')]}" domain="[('child_ids', '=', False)]" options="{'no_create': True, 'no_open': True}"/> <field name="organization_type_id" readonly="1" attrs="{'invisible': ['|', ('is_company', '=', False), ('type', '!=', 'contact')]}" options="{'no_create': True, 'no_open': True}"/> <field name="certification_ids" widget="many2many_tags" options="{'color_field': 'color', 'no_create': True}" attrs="{'invisible': [('is_company', '=', False)]}"/> + <field name="other_certification" attrs="{'invisible': [('is_company', '=', False)]}"/> <field name="segment_1_id" widget="many2many_tags" options="{'color_field': 'color', 'no_create': True}" domain="[('ur_id', '=', ur_id)]" attrs="{'invisible':[('segment_1_nb', '=', 0)]}" /> <field name="segment_2_id" widget="many2many_tags" options="{'color_field': 'color', 'no_create': True}" domain="[('ur_id', '=', ur_id)]" attrs="{'invisible':[('segment_2_nb', '=', 0)]}"/> <field name="segment_3_id" widget="many2many_tags" options="{'color_field': 'color', 'no_create': True}" domain="[('ur_id', '=', ur_id)]" attrs="{'invisible':[('segment_3_nb', '=', 0)]}"/> @@ -423,6 +424,7 @@ <field name="naf_id" attrs="{'readonly': [('write_date', '!=', False), ('project_status', '=', '6_suivi')], 'required':['|', ('project_status','in',('4_adhesion', '5_cg'), '&', ('write_date', '=', False), ('project_status', '=', '6_suivi'))], 'invisible': [('project_status', 'in', ('1_information', '2_pre-diagnostic', '3_accompagnement'))]}" options="{'no_open': True, 'no_create': True}"/> <field name="secteur_id" attrs="{'invisible': [('project_status', 'in', ('1_information', '2_pre-diagnostic', '3_accompagnement'))]}" /> <field name="certification_ids" widget="many2many_tags" options="{'color_field': 'color', 'no_create': True}" attrs="{'invisible': [('project_status', 'in', ('1_information', '2_pre-diagnostic', '3_accompagnement'))]}"/> + <field name="other_certification" attrs="{'invisible': [('project_status', 'in', ('1_information', '2_pre-diagnostic', '3_accompagnement'))]}"/> <label for='siret' string="SIRET" class="oe_edit_only" attrs="{'invisible': [('project_status', 'in', ('1_information', '2_pre-diagnostic', '3_accompagnement'))]}"/> <div> <field name="siret" class="oe_edit_only" attrs="{'readonly': [('write_date', '!=', False), ('project_status', '=', '6_suivi')], 'required':['|', ('project_status','in',('4_adhesion', '5_cg')), '&', ('write_date', '=', False), ('project_status', '=', '6_suivi')], 'invisible': [('project_status', 'in', ('1_information', '2_pre-diagnostic', '3_accompagnement'))]}"/>