From ec2ceb5d6bf9c9a12102de64b2eded66cc7c7062 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roberto=20L=C3=B3pez=20L=C3=B3pez=20=28OpenERP=29?= Date: Tue, 28 Feb 2012 09:22:26 +0100 Subject: [PATCH] [imp] js is calling the module bzr revid: rlo@openerp.com-20120228082226-su74ddghivymtp09 --- addons/google_docs/static/src/js/gdocs.js | 9 +++------ 1 file 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);