summaryrefslogtreecommitdiff
path: root/addons/google_docs
diff options
context:
space:
mode:
Diffstat (limited to 'addons/google_docs')
-rw-r--r--addons/google_docs/google_docs.py4
-rw-r--r--addons/google_docs/static/src/js/gdocs.js2
2 files changed, 3 insertions, 3 deletions
diff --git a/addons/google_docs/google_docs.py b/addons/google_docs/google_docs.py
index ac0cf68f3f6..4b98798c832 100644
--- a/addons/google_docs/google_docs.py
+++ b/addons/google_docs/google_docs.py
@@ -94,9 +94,9 @@ class google_docs_ir_attachment(osv.osv):
client = self._auth(cr, uid)
# fetch and copy the original document
try:
- original_resource = client.get_resource_by_id(gdoc_template_id)
+ doc = client.GetDoc(gdoc_template_id)
#copy the document you choose in the configuration
- copy_resource = client.copy_resource(original_resource, name_gdocs)
+ copy_resource = client.copy(doc, name_gdocs)
except:
raise osv.except_osv(_('Google Docs Error!'), _("Your resource id is not correct. You can find the id in the google docs URL."))
# create an ir.attachment
diff --git a/addons/google_docs/static/src/js/gdocs.js b/addons/google_docs/static/src/js/gdocs.js
index 45e1d09d42c..1cc511ef4d9 100644
--- a/addons/google_docs/static/src/js/gdocs.js
+++ b/addons/google_docs/static/src/js/gdocs.js
@@ -16,7 +16,7 @@ var _t = instance.web._t,
var view = self.getParent();
var ids = ( view.fields_view.type != "form" )? view.groups.get_selection().ids : [ view.datarecord.id ];
if( !_.isEmpty(ids) ){
- view.sidebar_context().done(function (context) {
+ view.sidebar_eval_context().done(function (context) {
var ds = new instance.web.DataSet(this, 'ir.attachment', context);
ds.call('google_doc_get', [view.dataset.model, ids, context]).done(function(r) {
if (r == 'False') {