From 3e785c9a4afb92d286bdd47464ad90e2298e9478 Mon Sep 17 00:00:00 2001 From: hsilvant <hsilvant@scop.coop> Date: Wed, 30 Sep 2020 20:30:27 +0200 Subject: [PATCH] =?UTF-8?q?Champs=20sp=C3=A9cifiques=20ICD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- models/calendar.py | 7 +++++++ views/calendar.xml | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/models/calendar.py b/models/calendar.py index f7fd5a8..8b52761 100644 --- a/models/calendar.py +++ b/models/calendar.py @@ -42,6 +42,13 @@ class CGScopCalendar(models.Model): ('teleworking', 'Télétravail'), ('absent', 'Absence, Congés, Divers')], string="Type de Réunion") + format = fields.Selection( + [('exchange', 'Echange'), + ('meeting', 'Rendez-vous'), + ('workshop', 'Atelier'), + ('training', 'Formation'), + ('networking', 'Animation réseau')], + string="Format du rdv") location = fields.Text() coop_id = fields.Many2one( comodel_name='res.partner', diff --git a/views/calendar.xml b/views/calendar.xml index 0a82abb..dd00af1 100644 --- a/views/calendar.xml +++ b/views/calendar.xml @@ -116,7 +116,8 @@ <span> hours</span> </div> <field name="allday" attrs="{'readonly': [('id', '!=', False), ('recurrency','=',True)]}" force_save="1"/> - <field name="type" /> + <field name="type" attrs="{'required': [('ur_id','=',%(cgscop_partner.riga_14231)d)]}"/> + <field name="format" attrs="{'invisible': [('ur_id','!=',%(cgscop_partner.riga_14231)d)]}"/> <field name="location" /> <field name="ur_financial_system_nb" invisible="1"/> <field name="ur_regional_convention_nb" invisible="1"/> -- GitLab