diff --git a/addons/base_calendar/base_calendar.py b/addons/base_calendar/base_calendar.py index 1d30db4c3cd..37ab6e37ffb 100644 --- a/addons/base_calendar/base_calendar.py +++ b/addons/base_calendar/base_calendar.py @@ -466,7 +466,7 @@ property or property parameter."), 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 @@ -487,7 +487,7 @@ property or property parameter."), 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): @@ -708,6 +708,23 @@ class calendar_alarm(osv.osv): 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 diff --git a/addons/base_calendar/crm_meeting.py b/addons/base_calendar/crm_meeting.py index 1d8694977b2..9c4cf8e95b2 100644 --- a/addons/base_calendar/crm_meeting.py +++ b/addons/base_calendar/crm_meeting.py @@ -281,21 +281,3 @@ class invite_wizard(osv.osv_memory): 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 -