From d68d2e44eb30b70266e6f11656e7bf4705b3824d Mon Sep 17 00:00:00 2001 From: "Parth Gajjar (Open ERP)" Date: Wed, 29 May 2013 13:16:29 +0530 Subject: [IMP] Improved Code bzr revid: pga@tinyerp.com-20130529074629-4x7dooxgbq5g6hdc --- addons/google_docs/google_docs.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'addons/google_docs/google_docs.py') 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): -- cgit v1.2.3