From 3e6f7c1e152d7b93fd7505046917d7b59552bee4 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Wed, 9 Dec 2015 18:44:05 +0100 Subject: [PATCH] [FIX] calendar: user multiple times in event attendees When creating a new event, with just you as attendee, then edit again the event and add someone else, the user is twice in the attendee of the event. This reverts the part done in `calendar.py` of revision 8483ca5 Even when you create an event for a job interview, this is not mandatory to set yourself as attendee. You can maybe be added by default, but you cannot force the user to be set as an attendee of the event. e.g. An HR officer can schedule a meeting for a job interview, with the department manager and the job applicant alone, without himself, thus. opw-658528 --- addons/calendar/calendar.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/addons/calendar/calendar.py b/addons/calendar/calendar.py index 642cb0e6007..596bdc5677f 100644 --- a/addons/calendar/calendar.py +++ b/addons/calendar/calendar.py @@ -1081,17 +1081,6 @@ class calendar_event(osv.Model): if self.pool['calendar.attendee']._send_mail_to_attendees(cr, uid, att_id, email_from=mail_from, context=context): self.message_post(cr, uid, event.id, body=_("An invitation email has been sent to attendee %s") % (partner.name,), subtype="calendar.subtype_invitation", context=context) - if current_user.partner_id.id not in new_att_partner_ids: - access_token = self.new_invitation_token(cr, uid, event, current_user.partner_id.id) - values = { - 'partner_id': current_user.partner_id.id, - 'event_id': event.id, - 'access_token': access_token, - 'email': current_user.partner_id.email, - } - current_user_att_id = self.pool['calendar.attendee'].create(cr, uid, values, context=context) - new_attendees.append(current_user_att_id) - new_att_partner_ids.append(current_user.partner_id.id) if new_attendees: self.write(cr, uid, [event.id], {'attendee_ids': [(4, att) for att in new_attendees]}, context=context) if new_att_partner_ids: