[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
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user