From e0ce682b3ffe5b680c508d2e8b48ce9dc4f05d3a Mon Sep 17 00:00:00 2001 From: michel Date: Wed, 15 Nov 2017 15:20:49 +0100 Subject: [PATCH] Add field title to name field of model --- models/event.py | 4 +++- views/event_views.xml | 16 ++++++++-------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/models/event.py b/models/event.py index 811da8a..e928ad3 100644 --- a/models/event.py +++ b/models/event.py @@ -12,7 +12,9 @@ class Event(models.Model): _description = 'Event model definition' _order = 'id asc' - name = fields.Char('Title', required=True) + title = fields.Char(required=True) + _rec_name = 'title' + manager_id = fields.Many2one('coworking.coworker', 'Manager', index=True, required=True, domain="[('coworker_type', 'in', ['staffer', 'member'])]") date_start = fields.Datetime(default=fields.Date.context_today, required=True) diff --git a/views/event_views.xml b/views/event_views.xml index 52d1f58..42f4497 100644 --- a/views/event_views.xml +++ b/views/event_views.xml @@ -13,7 +13,7 @@ - + @@ -31,11 +31,11 @@ - event Tree + event Tree coworking.event - + @@ -46,11 +46,11 @@ - Event Search + Event Search coworking.event - + - Event Calendar + Event Calendar coworking.event - + display="title : [title]" > +