diff --git a/models/calendar.py b/models/calendar.py index e47644834002668fccfedec68fbe3cdaa13fa559..fda0c8e7b1c45337c8b467e5e6de9e0a33ec3fb8 100644 --- a/models/calendar.py +++ b/models/calendar.py @@ -18,6 +18,8 @@ class CGScopCalendar(models.Model): def _default_ur(self): return self.env['res.company']._ur_default_get() + partner_ids = fields.Many2many(domain=[ + ('user_ids', '!=', False)]) type = fields.Selection([ ('outside', 'Extérieur'), ('ur', 'UR'), diff --git a/views/calendar.xml b/views/calendar.xml index aa6008decb0c01ffaa9c790f658489613f2bb07c..613d27657c32d3aa8d3f11d2fd498af3dbaf916b 100644 --- a/views/calendar.xml +++ b/views/calendar.xml @@ -66,7 +66,7 @@ <group name="event_info" col="1"> <group> <field name="project_id" options="{'no_open': True, 'no_create': True}"/> - <field name="coop_id" options="{'no_open': True, 'no_create': True}"/> + <field name="coop_id" options="{'no_open': True, 'no_create': True}" domain="[('ur_id', '=', ur_id)]"/> <field name="ur_id" invisible="1"/> <field name="partner_ids"