From ce8a4968deb120d4ba93cc590efcb8b1fbbd6db7 Mon Sep 17 00:00:00 2001 From: jke-openerp Date: Wed, 11 Dec 2013 14:06:35 +0100 Subject: [PATCH] [REF] Ref to remove warning about missing user_id in calendar.attendee bzr revid: jke@openerp.com-20131211130635-hjrb306zrph4dcg5 --- addons/base_calendar/base_calendar.py | 14 ++--- addons/base_calendar/crm_meeting_view.xml | 6 +- .../static/src/css/base_calender.css | 2 +- .../static/src/xml/base_calendar.xml | 2 +- .../google_base_account/controllers/main.py | 55 ++++++++---------- .../google_base_account.py | 19 +++--- addons/google_calendar/__init__.pyc | Bin 179 -> 179 bytes addons/google_calendar/google_calendar.py | 28 ++------- addons/google_calendar/google_calendar.pyc | Bin 30952 -> 30836 bytes .../static/src/js/calendar_sync.js | 4 +- 10 files changed, 53 insertions(+), 77 deletions(-) diff --git a/addons/base_calendar/base_calendar.py b/addons/base_calendar/base_calendar.py index f118c810aac..b9173dc7d28 100644 --- a/addons/base_calendar/base_calendar.py +++ b/addons/base_calendar/base_calendar.py @@ -115,7 +115,7 @@ class calendar_attendee(osv.osv): return result _columns = { - 'state': fields.selection([('needs-action', 'Needs Action'),('tentative', 'Uncertain'),('declined', 'Declined'),('accepted', 'Accepted')], 'Status', readonly=True, help="Status of the attendee's participation"), + 'state': fields.selection([('needsAction', 'Needs Action'),('tentative', 'Uncertain'),('declined', 'Declined'),('accepted', 'Accepted')], 'Status', readonly=True, help="Status of the attendee's participation"), 'cn': fields.function(_compute_data, string='Common name', type="char", size=124, multi='cn', store=True), 'dir': fields.char('URI Reference', size=124, help="Reference to the URI that points to the directory information corresponding to the attendee."), 'partner_id': fields.many2one('res.partner', 'Contact',readonly="True"), @@ -127,7 +127,7 @@ class calendar_attendee(osv.osv): 'event_id': fields.many2one('crm.meeting','Meeting linked'), } _defaults = { - 'state': 'needs-action', + 'state': 'needsAction', } def copy(self, cr, uid, id, default=None, context=None): @@ -220,7 +220,7 @@ class calendar_attendee(osv.osv): template_pool = self.pool.get('email.template') local_context = context.copy() color = { - 'needs-action' : 'grey', + 'needsAction' : 'grey', 'accepted' :'green', 'tentative' :'#FFFF00', 'declined':'red' @@ -297,8 +297,7 @@ class calendar_attendee(osv.osv): meeting_obj = self.pool.get('crm.meeting') res = self.write(cr, uid, ids, {'state': 'accepted'}, context) for attendee in self.browse(cr, uid, ids, context=context): - if attendee.ref: - meeting_obj.message_post(cr, uid, attendee.event_id.id, body=_(("%s has accepted invitation") % (attendee.cn)),subtype="base_calendar.subtype_invitation", context=context) + meeting_obj.message_post(cr, uid, attendee.event_id.id, body=_(("%s has accepted invitation") % (attendee.cn)),subtype="base_calendar.subtype_invitation", context=context) return res @@ -572,7 +571,7 @@ class calendar_alarm_manager(osv.osv): template_pool = self.pool.get('email.template') local_context = context and context.copy() or {} color = { - 'needs-action' : 'grey', + 'needsAction' : 'grey', 'accepted' :'green', 'tentative' :'#FFFF00', 'declined':'red' @@ -849,7 +848,7 @@ class crm_meeting(osv.Model): if field == 'is_attendee': res[meeting_id][field] = True if attendee else False elif field == 'attendee_status': - res[meeting_id][field] = attendee.state if attendee else 'needs-action' + res[meeting_id][field] = attendee.state if attendee else 'needsAction' elif field == 'display_time': res[meeting_id][field] = self._get_display_time(cr, uid, meeting_id, context=context) return res @@ -1082,7 +1081,6 @@ class crm_meeting(osv.Model): access_token = self.new_invitation_token(cr, uid, event, partner.id) att_id = self.pool.get('calendar.attendee').create(cr, uid, { 'partner_id': partner.id, - 'user_id': partner.user_ids and partner.user_ids[0].id or False, 'event_id': event.id, 'access_token': access_token, 'email': partner.email, diff --git a/addons/base_calendar/crm_meeting_view.xml b/addons/base_calendar/crm_meeting_view.xml index b5408b4198d..79cbc6968e6 100644 --- a/addons/base_calendar/crm_meeting_view.xml +++ b/addons/base_calendar/crm_meeting_view.xml @@ -138,9 +138,9 @@ -