[FIX] mail is sent for a meeting invitation
bzr revid: api@openerp.com-20121226165252-qrlmtmtz4lra2ijz
This commit is contained in:
@@ -539,7 +539,8 @@ property or property parameter."),
|
||||
vals['attachment_ids'] = [(0,0,{'name': 'invitation.ics',
|
||||
'datas_fname': 'invitation.ics',
|
||||
'datas': str(ics_file).encode('base64')})]
|
||||
self.pool.get('mail.mail').create(cr, uid, vals, context=context)
|
||||
mail_id = self.pool.get('mail.mail').create(cr, uid, vals, context=context)
|
||||
self.pool.get('mail.mail').browse(cr,uid,mail_id,context=context).send()
|
||||
return True
|
||||
|
||||
def onchange_user_id(self, cr, uid, ids, user_id, *args, **argv):
|
||||
@@ -1117,7 +1118,7 @@ rule or repeating pattern of time to exclude from the recurring rule."),
|
||||
for att in event.attendee_ids:
|
||||
attendees[att.partner_id.id] = True
|
||||
new_attendees = []
|
||||
mail_to = []
|
||||
mail_to = ""
|
||||
for partner in event.partner_ids:
|
||||
if partner.id in attendees:
|
||||
continue
|
||||
@@ -1128,7 +1129,7 @@ rule or repeating pattern of time to exclude from the recurring rule."),
|
||||
'email': partner.email
|
||||
}, context=context)
|
||||
if partner.email:
|
||||
mail_to.append(partner.email)
|
||||
mail_to = mail_to+" "+partner.email
|
||||
self.write(cr, uid, [event.id], {
|
||||
'attendee_ids': [(4, att_id)]
|
||||
}, context=context)
|
||||
|
||||
Reference in New Issue
Block a user