From e7f4891d4634875e960939e7f5d36063ed4b62c1 Mon Sep 17 00:00:00 2001 From: Vo Minh Thu Date: Thu, 6 Dec 2012 15:56:32 +0100 Subject: [IMP] use the openerp namespace. bzr revid: vmt@openerp.com-20121206145632-0h1coh5aaem65wsy --- addons/google_docs/google_docs.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'addons/google_docs/google_docs.py') diff --git a/addons/google_docs/google_docs.py b/addons/google_docs/google_docs.py index 462c8240810..21a340743ce 100644 --- a/addons/google_docs/google_docs.py +++ b/addons/google_docs/google_docs.py @@ -18,9 +18,9 @@ # ############################################################################## from datetime import datetime -from tools import DEFAULT_SERVER_DATETIME_FORMAT -from osv import osv, fields -from tools.translate import _ +from openerp.tools import DEFAULT_SERVER_DATETIME_FORMAT +from openerp.osv import fields, osv +from openerp.tools.translate import _ try: import gdata.docs.data import gdata.docs.client -- cgit v1.2.3 From 86954fd821c9becafd63eb2fb5170c41fb28f63d Mon Sep 17 00:00:00 2001 From: Arnaud Pineux Date: Thu, 27 Dec 2012 12:43:33 +0100 Subject: [FIX] google doc function changed because the google API has changed lp bug: https://launchpad.net/bugs/1084509 fixed bzr revid: api@openerp.com-20121227114333-3szgeyrc3d25ua39 --- addons/google_docs/google_docs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'addons/google_docs/google_docs.py') 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 -- cgit v1.2.3