From 8bf3c56fc7496cda613b3b1e8108d492f0cc8252 Mon Sep 17 00:00:00 2001 From: "rpa (Open ERP)" Date: Thu, 6 May 2010 14:39:16 +0530 Subject: [PATCH] [REM]: base_calendar: Removed code that parse the email to find a Yes/No/May be bzr revid: rpa@tinyerp.com-20100506090916-ttzg5n4rv34j0m9p --- addons/base_calendar/base_calendar.py | 59 --------------------------- 1 file changed, 59 deletions(-) diff --git a/addons/base_calendar/base_calendar.py b/addons/base_calendar/base_calendar.py index ceb6d729aeb..b2e57662cea 100644 --- a/addons/base_calendar/base_calendar.py +++ b/addons/base_calendar/base_calendar.py @@ -178,28 +178,12 @@ html_invitation = """ - - Are you coming? - : - - - - - - - @@ -385,49 +369,6 @@ property or property parameter."), 'state': lambda *x: 'needs-action', } - response_re = re.compile("Are you coming\?.*\n*.*(YES|NO|MAYBE).*", re.UNICODE) - - def msg_new(self, cr, uid, msg): - """ - @param self: The object pointer - @param cr: the current row, from the database cursor, - @param uid: the current user’s ID for security checks, - """ - return False - - def msg_act_get(self, msg): - """ - Get Message. - @param self: The object pointer - @return: dictionary of actions which contain state field value. - """ - - mailgate_obj = self.pool.get('mail.gateway') - body = mailgate_obj.msg_body_get(msg) - actions = {} - res = self.response_re.findall(body['body']) - if res: - actions['state'] = res[0] - return actions - - def msg_update(self, cr, uid, ids, msg, data={}, default_act='None'): - """ - Update msg state which may be accepted.declined.tentative. - @param cr: the current row, from the database cursor, - @param uid: the current user’s ID for security checks, - @param ids: List of calendar attendee’s IDs. - @param context: A standard dictionary for contextual values - @return: True - """ - msg_actions = self.msg_act_get(msg) - if msg_actions.get('state'): - if msg_actions['state'] in ['YES', 'NO', 'MAYBE']: - mapping = {'YES': 'accepted', 'NO': 'declined', 'MAYBE': 'tentative'} - status = mapping[msg_actions['state']] - print 'Got response for invitation id: %s as %s' % (ids, status) - self.write(cr, uid, ids, {'state': status}) - return True - def get_ics_file(self, cr, uid, event_obj, context=None): """ Returns iCalendar file for the event invitation
Note: If you are interested please reply this - mail and keep only your response from options YES, NO - and MAYBE.
From: