diff --git a/addons/base_calendar/base_calendar.py b/addons/base_calendar/base_calendar.py index 74351f87940..20acbcc5d5b 100644 --- a/addons/base_calendar/base_calendar.py +++ b/addons/base_calendar/base_calendar.py @@ -235,7 +235,6 @@ class calendar_attendee(osv.osv): ('declined', 'Declined'), ('accepted', 'Accepted'), ('delegated', 'Delegated')], 'Status', readonly=True, \ - write= ['portal.group_anonymous'] , help="Status of the attendee's participation"), 'rsvp': fields.boolean('Required Reply?', help="Indicats whether the favor of a reply is requested"), @@ -1008,8 +1007,6 @@ rule or repeating pattern of time to exclude from the recurring rule."), for partner in event.partner_ids: if partner.id in attendees: continue - local_context = context.copy() - local_context.pop('default_state', None) 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, @@ -1017,7 +1014,7 @@ rule or repeating pattern of time to exclude from the recurring rule."), 'ref': self._name+','+str(event.id), 'access_token': access_token, 'email': partner.email, - }, context=local_context) + }, context=context) if partner.email: mail_to = mail_to + " " + partner.email self.write(cr, uid, [event.id], { diff --git a/addons/base_calendar/controllers/main.py b/addons/base_calendar/controllers/main.py index 3ee025be849..846d004c8c5 100644 --- a/addons/base_calendar/controllers/main.py +++ b/addons/base_calendar/controllers/main.py @@ -16,21 +16,21 @@ class meetting_invitation(http.Controller): with registry.cursor() as cr: attendee_ids = attendee_pool.search(cr, SUPERUSER_ID, [('access_token','=',token)]) attendee_pool.do_accept(cr, SUPERUSER_ID, attendee_ids) - return self.view(db, token, action, id, view='form') + return self.view(db, action, id, view='form') @http.route('/meeting_invitation/decline', type='http', auth="none") - def declined(self, db, token, id): + def declined(self, db, token, action, id): # http://hostname:8069/meeting_invitation/accept/id=1&token=&db= registry = openerp.modules.registry.RegistryManager.get(db) attendee_pool = registry.get('calendar.attendee') with registry.cursor() as cr: attendee_ids = attendee_pool.search(cr, SUPERUSER_ID, [('access_token','=',token)]) attendee_pool.do_decline(cr, SUPERUSER_ID, attendee_ids) - return self.view(db, token, action, id, view='form') + return self.view(db, action, id, view='form') @http.route('/meeting_invitation/view', type='http', auth="none") - def view(self, db, token, action, id, view='calendar'): + def view(self, db, action, id, view='calendar'): # http://hostname:8069/meeting_invitation/view/id=1&token=&db=&view= js = "\n ".join('' % i for i in webmain.manifest_list('js', db=db)) css = "\n ".join('' % i for i in webmain.manifest_list('css',db=db)) diff --git a/addons/base_calendar/crm_meeting_data.xml b/addons/base_calendar/crm_meeting_data.xml index 3e0c79ca701..725dc08d934 100644 --- a/addons/base_calendar/crm_meeting_data.xml +++ b/addons/base_calendar/crm_meeting_data.xml @@ -119,7 +119,7 @@ Decline