diff options
Diffstat (limited to 'addons/google_drive/static/src')
| -rw-r--r-- | addons/google_drive/static/src/js/gdrive.js | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/addons/google_drive/static/src/js/gdrive.js b/addons/google_drive/static/src/js/gdrive.js index 1bfcc603d51..3267487b4e3 100644 --- a/addons/google_drive/static/src/js/gdrive.js +++ b/addons/google_drive/static/src/js/gdrive.js @@ -59,14 +59,9 @@ openerp.google_drive = function (instance, m) { var loaded = self.fetch('google.drive.config', ['google_drive_resource_id', 'google_drive_client_id'], [['id', '=', doc_item.config_id]]) .then(function (configs) { var ds = new instance.web.DataSet(self, 'google.drive.config'); - ds.call('get_google_doc_name', [[doc_item.config_id], doc_item.res_id,configs[0].google_drive_resource_id]).done(function (r) { - if (!_.isEmpty(r)) { - _.each(r, function (res) { - if(res.url) - { - window.open(res.url, '_blank'); - } - }); + ds.call('get_google_drive_url', [doc_item.config_id, doc_item.res_id,configs[0].google_drive_resource_id]).done(function (url) { + if (url){ + window.open(url, '_blank'); } }); }); |
