summaryrefslogtreecommitdiff
path: root/addons/google_docs/google_docs.py
diff options
context:
space:
mode:
authorMVA <mva@openerp.com>2012-03-28 11:47:18 +0200
committerMVA <mva@openerp.com>2012-03-28 11:47:18 +0200
commitc46481f1deb9e692058cd1ed42f9b96127ad6556 (patch)
tree4d751b530c7aa8c86dd9934c353be4021f4a5f5a /addons/google_docs/google_docs.py
parent2f1baf8f40908b54db0950f596fbe98e35d7cf9a (diff)
[IMP] add a raise error to check if configuration is ok
bzr revid: mva@openerp.com-20120328094718-xk5brbglmeo49cid
Diffstat (limited to 'addons/google_docs/google_docs.py')
-rw-r--r--addons/google_docs/google_docs.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/google_docs/google_docs.py b/addons/google_docs/google_docs.py
index 8c882a3422a..13d9634dcf8 100644
--- a/addons/google_docs/google_docs.py
+++ b/addons/google_docs/google_docs.py
@@ -43,7 +43,8 @@ class google_docs_ir_attachment(osv.osv):
user_config = google_pool.default_get( cr, uid, {'user' : '' , 'password' : ''},context=context)
#login gmail account
client = google_pool.google_login( user_config['user'], user_config['password'], type='docs_client', context=context)
-
+ if not client:
+ raise osv.except_osv(('Google Docs Error!'),("Check your google configuration in users/synchronization") )
return client
def create_empty_google_doc(self, cr, uid, model, ids, type_doc,context=None):