From e82e12e3a4229d386ea12da4b3e71aa61ce3abb4 Mon Sep 17 00:00:00 2001 From: Florian Charlier Date: Tue, 18 Jan 2022 16:43:36 +0000 Subject: [PATCH] [IMP] calendar: improve UI/UX A reorganization of the calendar alarm form view was necessary for easier extension with new fields (such as the one from appointment, see links). The partner is now the author of notifications about their invitation (instead of public user). Task-2709580 See odoo/enterprise#23191 closes odoo/odoo#82387 Related: odoo/upgrade#3383 Signed-off-by: Thibault Delavallee (tde) --- addons/calendar/models/calendar_attendee.py | 12 ++++++++---- addons/calendar/views/calendar_views.xml | 14 +++++--------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/addons/calendar/models/calendar_attendee.py b/addons/calendar/models/calendar_attendee.py index dca29b1693e..0c30f1c7a5a 100644 --- a/addons/calendar/models/calendar_attendee.py +++ b/addons/calendar/models/calendar_attendee.py @@ -148,14 +148,18 @@ class Attendee(models.Model): """ Marks event invitation as Accepted. """ for attendee in self: attendee.event_id.message_post( - body=_("%s has accepted invitation") % (attendee.common_name), - subtype_xmlid="calendar.subtype_invitation") + author_id=attendee.partner_id.id, + body=_("%s has accepted the invitation") % (attendee.common_name), + subtype_xmlid="calendar.subtype_invitation", + ) return self.write({'state': 'accepted'}) def do_decline(self): """ Marks event invitation as Declined. """ for attendee in self: attendee.event_id.message_post( - body=_("%s has declined invitation") % (attendee.common_name), - subtype_xmlid="calendar.subtype_invitation") + author_id=attendee.partner_id.id, + body=_("%s has declined the invitation") % (attendee.common_name), + subtype_xmlid="calendar.subtype_invitation", + ) return self.write({'state': 'declined'}) diff --git a/addons/calendar/views/calendar_views.xml b/addons/calendar/views/calendar_views.xml index b1a66d74cca..6d59481a7a6 100644 --- a/addons/calendar/views/calendar_views.xml +++ b/addons/calendar/views/calendar_views.xml @@ -39,24 +39,20 @@
- + + + - + - - - - - -