summaryrefslogtreecommitdiff
path: root/addons/google_drive/models
diff options
context:
space:
mode:
authorJérome Maes <jem@openerp.com>2016-05-20 16:23:25 +0200
committerJérome Maes <jem@openerp.com>2016-05-31 09:09:23 +0200
commit36fa95df0bacd5d57f3eb2b1526e1c45a8f53f79 (patch)
tree854ca24737487c581475a22c86b99d79fc01e78b /addons/google_drive/models
parent8107916079921225b50bcf1ab9c2b3a5ae80dcb9 (diff)
[IMP] google_drive : make it use the constant defined in google_account
Diffstat (limited to 'addons/google_drive/models')
-rw-r--r--addons/google_drive/models/google_drive.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/google_drive/models/google_drive.py b/addons/google_drive/models/google_drive.py
index 655a28d3e23..b4b6f56c880 100644
--- a/addons/google_drive/models/google_drive.py
+++ b/addons/google_drive/models/google_drive.py
@@ -11,7 +11,7 @@ from odoo.exceptions import RedirectWarning, UserError
from odoo.tools.safe_eval import safe_eval as eval
from odoo.tools.translate import _
-from odoo.addons.google_account import TIMEOUT
+from odoo.addons.google_account.models.google_service import GOOGLE_TOKEN_ENDPOINT, TIMEOUT
_logger = logging.getLogger(__name__)
@@ -71,7 +71,7 @@ class GoogleDrive(models.Model):
})
headers = {"Content-type": "application/x-www-form-urlencoded"}
try:
- req = urllib2.Request('https://accounts.google.com/o/oauth2/token', data, headers)
+ req = urllib2.Request(GOOGLE_TOKEN_ENDPOINT, data, headers)
content = urllib2.urlopen(req, timeout=TIMEOUT).read()
except urllib2.HTTPError:
if user_is_admin: