[FIX] calendar: avoid creation of the document on invitation
Install Projects, documents, calendar, website, crm. Under Settings enable "File Centralization" Now go to Projects, enter in a Task, click on "schedule activity". On the activity form under "Activity Type" choose Meeting, click on "Open Calendar" button. Choose a slot, edit the event, add a contact type individual, save Error will popup. This is caused by the whole flow of creating a new document for the invitation.ics generated for the meetings which has to be sent via email but get detected as an attachment to be sent into the document app as well. Disabling the document creation since it is not a relevant attachment opw-2150770 closes odoo/odoo#43537 X-original-commit: 4e30db33938d4d740d847cfbc6a29b4013be964d Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
This commit is contained in:
@@ -210,7 +210,9 @@ class Attendee(models.Model):
|
||||
'mimetype': 'text/calendar',
|
||||
'datas': base64.b64encode(ics_file)})
|
||||
]
|
||||
mail_ids.append(invitation_template.send_mail(attendee.id, email_values=email_values, notif_layout='mail.mail_notification_light'))
|
||||
mail_ids.append(invitation_template.with_context(no_document=True).send_mail(attendee.id, email_values=email_values, notif_layout='mail.mail_notification_light'))
|
||||
else:
|
||||
mail_ids.append(invitation_template.send_mail(attendee.id, email_values=email_values, notif_layout='mail.mail_notification_light'))
|
||||
|
||||
if force_send and mail_ids:
|
||||
res = self.env['mail.mail'].sudo().browse(mail_ids).send()
|
||||
|
||||
Reference in New Issue
Block a user