summaryrefslogtreecommitdiff
path: root/addons/calendar/controllers
diff options
context:
space:
mode:
authorjke-openerp <jke@openerp.com>2013-12-20 17:08:18 +0100
committerjke-openerp <jke@openerp.com>2013-12-20 17:08:18 +0100
commitc274b28f4a718f9028d55f6925b678cd191cc2b9 (patch)
treed59fd7bfb1ec34d341d83f97de495e368d6dcd4b /addons/calendar/controllers
parent0659fff17d77deb212a66f856e581e14da68996e (diff)
[TYPO] cleaning
bzr revid: jke@openerp.com-20131220160818-56skpmvbzub6mn1r
Diffstat (limited to 'addons/calendar/controllers')
-rw-r--r--addons/calendar/controllers/main.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/addons/calendar/controllers/main.py b/addons/calendar/controllers/main.py
index 2b56779cb72..ba744ab8c88 100644
--- a/addons/calendar/controllers/main.py
+++ b/addons/calendar/controllers/main.py
@@ -19,14 +19,13 @@ class meeting_invitation(http.Controller):
if not attendee_id:
# if token is not match
error_message = """Invalid Invitation Token."""
- elif request.session.uid and request.session.login != 'anonymous':
- # if valid session but user is not match
- attendee = attendee_pool.browse(cr, openerp.SUPERUSER_ID, attendee_id[0])
- user = registry.get('res.users').browse(cr, openerp.SUPERUSER_ID, request.session.uid)
- if attendee.partner_id.user_id.id != user.id:
- #error_message = """Invitation cannot be forwarded via email. This event/meeting belongs to %s and you are logged in as %s. Please ask organizer to add you.""" % (attendee.email, user.email)
- #error_message = "attendee.partner_id.user_id.id != user.id: ", attendee.partner_id.user_id.id ," VS ", user.id
- print "ErRRRRRRRRRROOOOOOOrrrrrr"
+# elif request.session.uid and request.session.login != 'anonymous':
+# # if valid session but user is not match
+# attendee = attendee_pool.browse(cr, openerp.SUPERUSER_ID, attendee_id[0])
+# user = registry.get('res.users').browse(cr, openerp.SUPERUSER_ID, request.session.uid)
+# if attendee.partner_id.user_id.id != user.id:
+# error_message = """Invitation cannot be forwarded via email. This event/meeting belongs to %s and you are logged in as %s. Please ask organizer to add you.""" % (attendee.email, user.email)
+
if error_message:
raise BadRequest(error_message)
return True
@@ -74,7 +73,8 @@ class meeting_invitation(http.Controller):
'modules': simplejson.dumps(webmain.module_boot(db)),
'init': "s.calendar.event('%s', '%s', '%s', '%s' , '%s');" % (db, action, id, 'form', json.dumps(attendee_data)),
}
-
+
+ # Function used, in RPC to check every 5 minutes, if notification to do for an event or not
@http.route('/calendar/NextNotify', type='json', auth="none")
def NextNotify(self, type=''):
registry = openerp.modules.registry.RegistryManager.get(request.session.db)