From 7d4e4dbf965d02531d855b949dc4060dd66e0d54 Mon Sep 17 00:00:00 2001 From: Fabien Bourgeois Date: Fri, 29 Jul 2016 11:57:05 +0200 Subject: [PATCH] [IMP]Note dates : form enhancement for daily and moments, tags display addition on calendar view --- note_dates/models/note_dates.py | 6 ++++++ note_dates/views/note_dates.xml | 14 +++++++++----- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/note_dates/models/note_dates.py b/note_dates/models/note_dates.py index a0e3a56..860648f 100644 --- a/note_dates/models/note_dates.py +++ b/note_dates/models/note_dates.py @@ -29,6 +29,12 @@ class Note(models.Model): ('night', _('Night'))], string='Moment') date_start = fields.Datetime('Start') date_stop = fields.Datetime('End') + tag_names = fields.Char('Tag Names', compute='_compute_tag_names') + + @api.one + @api.depends('tag_ids') + def _compute_tag_names(self): + self.tag_names = u']['.join([t.name for t in self.tag_ids]) @api.onchange('is_daily') def onchange_isdaily(self): diff --git a/note_dates/views/note_dates.xml b/note_dates/views/note_dates.xml index 6e5be1a..30efbed 100644 --- a/note_dates/views/note_dates.xml +++ b/note_dates/views/note_dates.xml @@ -27,10 +27,12 @@ along with this program. If not, see . - - - - + + + @@ -53,8 +55,10 @@ along with this program. If not, see . note.note + color="stage_id" all_day="is_daily" mode="day" + display="[[tag_names]] - [name]" > +