Skip to Content
मेन्यू
This question has been flagged
2 Replies
3759 Views

Hello,


I added meetings in my calander and send the invitations emails.

But Thunderbird did not recognize the attachted .ics File as caleder type.


I checked now another email, where Thunderbird show me "add to calendar" and there attached .ics file is defined as:

Content-Type: text/calendar; name="up2date_2017.ics"
Content-Description: up2date_2017.ics
Content-Disposition: attachment; filename="up2date_2017.ics"; size=3172;
	creation-date="Tue, 18 Apr 2017 09:00:41 GMT";
	modification-date="Tue, 18 Apr 2017 09:00:41 GMT"
Content-Transfer-Encoding: base64

But in the email, which odoo 10 send, is the attached .ics file as:

MIME-Version: 1.0
Content-Type: application/octet-stream; name="invitation.ics"
Content-Disposition: attachment; filename="invitation.ics"
Content-Transfer-Encoding: base64


So I guess, because of this, Thunderbird did not see the .ics as calendar event.


How can I fix this?


Thank you!


Avatar
Discard
Best Answer

It is a first step...

But when the mail is sent, the attachment is always sent in octet-stream anyway.


Maybe can you check it : https://github.com/odoo-dev/odoo/commit/b6c4fbcc010583b8632f864344e02f3310e7791f


Let me know if it works with it !!! 

Avatar
Discard
Author

Hi ... oh, great fast response!

But when I change this 3 files, odoo are not starting. Did I need some update after?

Author

great, work. Thank you!

Will be available from saas-15/v11 in standard version ! Thanks for the reporting and feedback

Author Best Answer

I found in:

\odoo\\\\\/\\\addons\\\\/\\\calendar\\\\/\\\models/calendar.py

at line 168:

vals['attachment_ids'] = [(0, 0, {'name': 'invitation.ics','datas_fname': 'invitation.ics','datas': str(ics_file).encode('base64')})]

I changed to:

vals['attachment_ids'] = [(0, 0, {'mimetype': 'text/calendar','name': 'invitation.ics','datas_fname': 'invitation.ics','datas': str(ics_file).encode('base64')})]

I get no error, but the attachemend is still:

MIME-Version: 1.0
Content-Type: application/octet-stream; name="invitation.ics"
Content-Disposition: attachment; filename="invitation.ics"
Content-Transfer-Encoding: base64
Avatar
Discard