[FIX] calendar: message_(un)subscribe expects integers
In calendar, using recurrent events leads to the use of virtual ids, which are strings. It wasn't possible to change the message subscriptions for recurring events, neither for the user himself, neither for the other followers opw-627895
This commit is contained in:
@@ -1416,6 +1416,12 @@ class calendar_event(osv.Model):
|
||||
del context['default_date']
|
||||
return super(calendar_event, self).message_post(cr, uid, thread_id, body=body, subject=subject, type=type, subtype=subtype, parent_id=parent_id, attachments=attachments, context=context, **kwargs)
|
||||
|
||||
def message_subscribe(self, cr, uid, ids, partner_ids, subtype_ids=None, context=None):
|
||||
return super(calendar_event, self).message_subscribe(cr, uid, get_real_ids(ids), partner_ids, subtype_ids=subtype_ids, context=context)
|
||||
|
||||
def message_unsubscribe(self, cr, uid, ids, partner_ids, context=None):
|
||||
return super(calendar_event, self).message_unsubscribe(cr, uid, get_real_ids(ids), partner_ids, context=context)
|
||||
|
||||
def do_sendmail(self, cr, uid, ids, context=None):
|
||||
for event in self.browse(cr, uid, ids, context):
|
||||
current_user = self.pool['res.users'].browse(cr, uid, uid, context=context)
|
||||
@@ -1747,7 +1753,6 @@ class calendar_event(osv.Model):
|
||||
|
||||
return res
|
||||
|
||||
|
||||
class mail_message(osv.Model):
|
||||
_inherit = "mail.message"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user