for attandee in self.browse(cr, uid, ids, context=context):
meeting_ids = meeting_obj.search(cr, uid, [('attendee_ids', '=', attandee.id)], context=context)
if meeting_ids:
- meeting_obj.message_post(cr, uid, meeting_ids, body=_(("%s has accepted invitation") % (attandee.cn)), context=context)
+ meeting_obj.message_post(cr, uid, get_real_ids(meeting_ids), body=_(("%s has accepted invitation") % (attandee.cn)), context=context)
return res
for attandee in self.browse(cr, uid, ids, context=context):
meeting_ids = meeting_obj.search(cr, uid, [('attendee_ids', '=', attandee.id)], context=context)
if meeting_ids:
- meeting_obj.message_post(cr, uid, meeting_ids, body=_(("%s has declined invitation") % (attandee.cn)), context=context)
+ meeting_obj.message_post(cr, uid, get_real_ids(meeting_ids), body=_(("%s has declined invitation") % (attandee.cn)), context=context)
return res
def create(self, cr, uid, vals, context=None):
res = super(calendar_alarm, self).create(cr, uid, vals, context=context)
return res
+class res_partner(osv.osv):
+ _inherit = 'res.partner'
+
+ def get_attendee_detail(self, cr, uid, ids, meeting_id, context=None):
+ datas = []
+ meeting = False
+ if meeting_id:
+ meeting = self.pool.get('crm.meeting').browse(cr, uid, get_real_ids(meeting_id),context)
+ for partner in self.browse(cr, uid, ids, context=context):
+ data = self.name_get(cr, uid, [partner.id], context)[0]
+ if meeting:
+ for attendee in meeting.attendee_ids:
+ if attendee.partner_id.id == partner.id:
+ data = (data[0], data[1], attendee.state)
+ datas.append(data)
+ return datas
+
def do_run_scheduler(self, cr, uid, automatic=False, use_new_cursor=False, \
context=None):
"""Scheduler for event reminder
if 'res_id' in result:
result['res_id'] = get_real_ids(result['res_id'])
return result
-
-class res_partner(osv.osv):
- _inherit = 'res.partner'
-
- def get_attendee_detail(self, cr, uid, ids, meeting_id, context=None):
- datas = []
- meeting = False
- if meeting_id:
- meeting = self.pool.get('crm.meeting').browse(cr, uid, int(meeting_id),context)
- for partner in self.browse(cr, uid, ids, context=context):
- data = self.name_get(cr, uid, [partner.id], context)[0]
- if meeting:
- for attendee in meeting.attendee_ids:
- if attendee.partner_id.id == partner.id:
- data = (data[0], data[1], attendee.state)
- datas.append(data)
- return datas
-