[FIX] google_drive : translate the record

Pass the context, with the language setting, when the record is read to
fill the google drive template. That allows to translate the name of the
document and all the informations inside.

opw-626675
This commit is contained in:
Denis Michiels 2015-02-20 16:08:10 +01:00
parent 4625b5c840
commit b8ecbe3191
1 changed files with 1 additions and 1 deletions

View File

@ -64,7 +64,7 @@ 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_drive_url', [doc_item.config_id, doc_item.res_id,configs[0].google_drive_resource_id]).done(function (url) {
ds.call('get_google_drive_url', [doc_item.config_id, doc_item.res_id,configs[0].google_drive_resource_id, self.dataset.context]).done(function (url) {
if (url){
window.open(url, '_blank');
}