summaryrefslogtreecommitdiff
path: root/addons/google_docs/static/src/js/gdocs.js
diff options
context:
space:
mode:
Diffstat (limited to 'addons/google_docs/static/src/js/gdocs.js')
-rw-r--r--addons/google_docs/static/src/js/gdocs.js9
1 files changed, 3 insertions, 6 deletions
diff --git a/addons/google_docs/static/src/js/gdocs.js b/addons/google_docs/static/src/js/gdocs.js
index 6ef889e3fa0..32a57e18c0c 100644
--- a/addons/google_docs/static/src/js/gdocs.js
+++ b/addons/google_docs/static/src/js/gdocs.js
@@ -1,18 +1,15 @@
-console.log('fegegegwnw')
-openerp.google_docs = function(instance) {
+openerp.google_docs = function(instance, session) {
-console.log('nw')
instance.web.form.SidebarAttachments = instance.web.form.SidebarAttachments.extend({
init: function() {
this._super.apply(this, arguments);
- this.$element.delegate('.oe_google_docs_button', 'click', this.on_add_gdoc);
+ this.$element.delegate('.oe_google_docs_button', 'click', this.on_add_gdoc);
},
on_add_gdoc: function() {
var self = this;
-console.log('--------');
var $gdocbtn = this.$element.find('.oe_google_docs_button');
$gdocbtn.attr('disabled', 'true').find('img, span').toggle();
- this.view.dataset.call_button('copy_gdoc', [[this.view.datarecord.id], this.view.dataset.get_context()], function(r) {
+ new openerp.sessions.session0.web.DataSet(this, 'google.docs').call_button('copy_gdoc', [[this.view.datarecord.id], this.view.dataset.get_context()], function(r) {
$gdocbtn.hide();
self.do_update();
self.do_action(r.result);