From 58fddb6132a7a61ab3e44918dae0a8a7700bd059 Mon Sep 17 00:00:00 2001 From: "rpa (Open ERP)" Date: Thu, 25 Mar 2010 17:23:54 +0530 Subject: [PATCH] [FIX]: base_calendar: Fixed some problems for attendee invitation bzr revid: rpa@tinyerp.com-20100325115354-x8lfkcchw9k9zg3t --- addons/base_calendar/base_calendar.py | 6 ++---- .../base_calendar/wizard/base_calendar_invite_attendee.py | 1 + 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/addons/base_calendar/base_calendar.py b/addons/base_calendar/base_calendar.py index 22949f9138a..8c7aa0ba6b9 100644 --- a/addons/base_calendar/base_calendar.py +++ b/addons/base_calendar/base_calendar.py @@ -404,11 +404,9 @@ request was delegated to"), sign = att.sent_by_uid and att.sent_by_uid.signature or '' sign = '
'.join(sign and sign.split('\n') or []) res_obj = att.ref - if res_obj and len(res_obj): - res_obj = res_obj[0] sub = '[%s Invitation][%d] %s' % (company, att.id, res_obj.name) att_infos = [] - other_invitaion_ids = self.search(cr, uid, [('ref', '=', att.ref)]) + other_invitaion_ids = self.search(cr, uid, [('ref','=', att.ref._name + ',' + str(att.ref.id))]) for att2 in self.browse(cr, uid, other_invitaion_ids): att_infos.append(((att2.user_id and att2.user_id.name) or \ (att2.partner_id and att2.partner_id.name) or \ @@ -869,7 +867,7 @@ rule or repeating pattern for anexception to a recurrence set"), defaults.update({'table': self._table}) qry = "UPDATE %(table)s set name = '%(name)s', \ - date = '% (date)s', date_deadline = '% (date_deadline)s'" + date = '%(date)s', date_deadline = '%(date_deadline)s'" if defaults.get('alarm_id'): qry += ", alarm_id = %(alarm_id)s" if defaults.get('location'): diff --git a/addons/base_calendar/wizard/base_calendar_invite_attendee.py b/addons/base_calendar/wizard/base_calendar_invite_attendee.py index c5662e59100..ad5c2066714 100755 --- a/addons/base_calendar/wizard/base_calendar_invite_attendee.py +++ b/addons/base_calendar/wizard/base_calendar_invite_attendee.py @@ -21,6 +21,7 @@ from base_calendar import base_calendar from osv import fields, osv +import tools class base_calendar_invite_attendee(osv.osv_memory): """