From 1c812892360c146269c11108f6b0f4c5cb2662ff Mon Sep 17 00:00:00 2001 From: michel Date: Mon, 13 Nov 2017 19:31:43 +0100 Subject: [PATCH] / --- models/event.py | 4 ++-- views/coworker_views.xml | 3 --- views/event_menu.xml | 4 ++-- views/event_views.xml | 17 ++++++++++++++++- 4 files changed, 20 insertions(+), 8 deletions(-) diff --git a/models/event.py b/models/event.py index 99e125e..c9c825f 100644 --- a/models/event.py +++ b/models/event.py @@ -12,7 +12,7 @@ class Event(models.Model): _order = 'id desc' title = fields.Char(required=True) - # manager = fields.Many2one('coworker.users','Manager', required=True, index=True) + manager_id = fields.Many2one('coworking.coworker', 'Users', required=False, index=True) date_start = fields.Datetime(default=fields.Date.context_today, required=True) date_end = fields.Datetime(required=True) @@ -22,7 +22,7 @@ class Event(models.Model): ('confirmed', 'Confirmed'), ('canceled', 'Canceled')], default='draft') - participants_ids = fields.Many2many('coworking.coworker.name', string='Name') + participants_ids = fields.Many2many('coworking.coworker', string='Users') @api.constrains('date_end') diff --git a/views/coworker_views.xml b/views/coworker_views.xml index 758e309..003145a 100644 --- a/views/coworker_views.xml +++ b/views/coworker_views.xml @@ -18,7 +18,6 @@ - @@ -39,7 +38,6 @@ - @@ -138,7 +136,6 @@ - diff --git a/views/event_menu.xml b/views/event_menu.xml index 8c46ee4..41e46ac 100644 --- a/views/event_menu.xml +++ b/views/event_menu.xml @@ -4,8 +4,8 @@ - + res_model="coworking.event" view_mode="tree,form" /> + diff --git a/views/event_views.xml b/views/event_views.xml index 2c5842b..ee509e6 100644 --- a/views/event_views.xml +++ b/views/event_views.xml @@ -11,7 +11,7 @@ - + @@ -25,4 +25,19 @@ + + + event Tree + coworking.event + + + + + + + + + + +