diff options
| author | Parth Gajjar (Open ERP) <pga@tinyerp.com> | 2013-05-29 13:16:29 +0530 |
|---|---|---|
| committer | Parth Gajjar (Open ERP) <pga@tinyerp.com> | 2013-05-29 13:16:29 +0530 |
| commit | d68d2e44eb30b70266e6f11656e7bf4705b3824d (patch) | |
| tree | 25599e48ae1812cf4547a4f75f53d345bff0a456 /addons/google_docs | |
| parent | 0fec1053f3ef27da8e09d54d6ba5817ab716eb32 (diff) | |
[IMP] Improved Code
bzr revid: pga@tinyerp.com-20130529074629-4x7dooxgbq5g6hdc
Diffstat (limited to 'addons/google_docs')
| -rw-r--r-- | addons/google_docs/google_docs.py | 4 | ||||
| -rw-r--r-- | addons/google_docs/res_config_user_view.xml | 1 |
2 files changed, 2 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): diff --git a/addons/google_docs/res_config_user_view.xml b/addons/google_docs/res_config_user_view.xml index 50cb1851d07..06a729125ab 100644 --- a/addons/google_docs/res_config_user_view.xml +++ b/addons/google_docs/res_config_user_view.xml @@ -76,6 +76,7 @@ <xpath expr="//div[@name='google_docs']" position="after"> <div attrs="{'invisible': [('module_google_docs','=',False)]}"> <p class="oe_gray" > + <!-- Need to generate client id, redirect url from Google Account (API console) and replace below link. Limitation on Number of request: 10 lacks per day. --> Click here to <a href="https://accounts.google.com/o/oauth2/auth?scope=https://www.googleapis.com/auth/drive&redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=code&client_id=39623646228-eg3ggo3mk6o40m7rguobi3rkl9frh4tb.apps.googleusercontent.com" target="_blank"><b>Generate Google Authorization Code</b></a><br/> <group> <field name="authorization_code" on_change="onchange_authorization_code(authorization_code)"/> |
