summaryrefslogtreecommitdiff
path: root/addons/google_docs/google_docs.py
diff options
context:
space:
mode:
authorParth Gajjar (Open ERP) <pga@tinyerp.com>2013-05-29 13:16:29 +0530
committerParth Gajjar (Open ERP) <pga@tinyerp.com>2013-05-29 13:16:29 +0530
commitd68d2e44eb30b70266e6f11656e7bf4705b3824d (patch)
tree25599e48ae1812cf4547a4f75f53d345bff0a456 /addons/google_docs/google_docs.py
parent0fec1053f3ef27da8e09d54d6ba5817ab716eb32 (diff)
[IMP] Improved Code
bzr revid: pga@tinyerp.com-20130529074629-4x7dooxgbq5g6hdc
Diffstat (limited to 'addons/google_docs/google_docs.py')
-rw-r--r--addons/google_docs/google_docs.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/addons/google_docs/google_docs.py b/addons/google_docs/google_docs.py
index e97f0d929f1..98ca35e20cc 100644
--- a/addons/google_docs/google_docs.py
+++ b/addons/google_docs/google_docs.py
@@ -97,10 +97,8 @@ class config(osv.osv):
attach_vals = {'res_model': res_model, 'name': name_gdocs, 'res_id': res_id, 'type': 'url', 'url':content['alternateLink']}
attach_pool.create(cr, uid, attach_vals)
res = content['alternateLink']
- elif uid==1:
- raise self.pool.get('res.config.settings').get_config_warning(cr, _("You haven't configured 'Authorization Code' generated from google, Please generate and configure it in %%(menu:base_setup.menu_general_configuration)s."), context=context)
else:
- raise osv.except_osv(_('Google Drive Configuration Error!'), _("'Authorization Code' is not configured yet, Please Contact Administrator"))
+ raise self.pool.get('res.config.settings').get_config_warning(cr, _("You haven't configured 'Authorization Code' generated from google, Please generate and configure it in %%(menu:base_setup.menu_general_configuration)s."), context=context)
return res
def get_google_docs_config(self, cr, uid, res_model, res_id, context=None):