[IMP] sync_google_calendar: Raised a proper error message if user has no access rights.
bzr revid: uco@tinyerp.com-20110408070857-e77tdgrd4dr93d2e
This commit is contained in:
parent
31729c526c
commit
b8fc11116d
|
@ -75,8 +75,12 @@ class google_login(osv.osv_memory):
|
|||
'gmail_password': password
|
||||
}
|
||||
self.pool.get('res.users').write(cr, uid, uid, res, context=context)
|
||||
except :
|
||||
raise osv.except_osv(_('Error'), _("Authentication fail check the user and password !"))
|
||||
except Exception, e:
|
||||
if len(e.args) > 1:
|
||||
msg = e.args[1]
|
||||
else:
|
||||
msg = e.args[0]
|
||||
raise osv.except_osv(_('Error'), _("%s" %msg))
|
||||
|
||||
return self._get_next_action(cr, uid, context=context)
|
||||
|
||||
|
|
Loading…
Reference in New Issue