summaryrefslogtreecommitdiff
path: root/addons/google_docs/static/src/js
diff options
context:
space:
mode:
authorRGA(OpenERP) <>2012-10-16 11:42:04 +0530
committerRGA(OpenERP) <>2012-10-16 11:42:04 +0530
commitc9f02f6dd964eaa43544c5a3efa1d03c96264db9 (patch)
treed294791964e9bb4234e890379a42102973c870fe /addons/google_docs/static/src/js
parent81b2e5c8ae46d795bf6e0cb7fc620d60f5c5b291 (diff)
parentdaa7ed0fb52a3fc195eaf370f0376bfbdbe3352f (diff)
Merge with trunk
bzr revid: rgaopenerp-20121016061204-yj01xi7vzc7kh2qr
Diffstat (limited to 'addons/google_docs/static/src/js')
-rw-r--r--addons/google_docs/static/src/js/gdocs.js17
1 files changed, 8 insertions, 9 deletions
diff --git a/addons/google_docs/static/src/js/gdocs.js b/addons/google_docs/static/src/js/gdocs.js
index c2c0ded407b..a1704cde69c 100644
--- a/addons/google_docs/static/src/js/gdocs.js
+++ b/addons/google_docs/static/src/js/gdocs.js
@@ -8,7 +8,7 @@ var QWeb = instance.web.qweb,
this._super.apply(this, arguments);
self.$el.find('.oe_sidebar_add_attachment').after(QWeb.render('Google_doc', {widget: self}))
self.$el.find('.oe_sidebar_add_google_doc').on('click', function (e) {
- self.on_google_doc();
+ self.on_google_doc();
});
},
on_google_doc: function() {
@@ -16,7 +16,7 @@ var QWeb = instance.web.qweb,
var form = self.getParent();
form.sidebar_context().then(function (context) {
var ds = new instance.web.DataSet(this, 'ir.attachment', context);
- def = ds.call('google_doc_get', [form.dataset.model, [form.datarecord.id], context], function(r) {
+ ds.call('google_doc_get', [form.dataset.model, [form.datarecord.id], context]).then(function(r) {
if (r == 'False') {
var params = {
error: response,
@@ -27,11 +27,10 @@ var QWeb = instance.web.qweb,
modal: true,
});
}
-
- }).done(function(){
- form.reload();
- });
- })
+ }).done(function(){
+ form.reload();
+ });
+ });
}
- })
-}
+ });
+};