diff options
| author | Roberto López López (OpenERP) <rlo@openerp.com> | 2012-02-29 09:38:33 +0100 |
|---|---|---|
| committer | Roberto López López (OpenERP) <rlo@openerp.com> | 2012-02-29 09:38:33 +0100 |
| commit | f8213e68f0a1d5ffde27a47b70211a0cb205db9a (patch) | |
| tree | 5cdb0a54b896504e062c5d1f86361e1afae4ae58 /addons/google_docs/google_docs.py | |
| parent | 841f8b12b413dd7a0d4091182d092128f27da5f3 (diff) | |
[imp] integration with google_base_account
bzr revid: rlo@openerp.com-20120229083833-yd0wfg8x5ywc9e1c
Diffstat (limited to 'addons/google_docs/google_docs.py')
| -rw-r--r-- | addons/google_docs/google_docs.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/addons/google_docs/google_docs.py b/addons/google_docs/google_docs.py index 1dd632aab83..1c36533e614 100644 --- a/addons/google_docs/google_docs.py +++ b/addons/google_docs/google_docs.py @@ -23,7 +23,7 @@ GOOGLE DOCS ######################################### ''' - edit_url_template = 'https://docs.google.com/Edit?docid=%s' + edit_url_template = 'https://docs.google.com/document/d/%s/edit' prefix_gdoc_id_res = DOCUMENT_LABEL + ':' def copy_gdoc(self, cr, uid, model, context=None): @@ -61,6 +61,9 @@ google_docs.copy_gdoc() # check google_base_account users_obj = self.pool.get('res.users') user = users_obj.browse(cr, uid, [uid])[0] + print '%s' % user.__dict__ + print '%s' % user.gmail_user + print '%s' % user.gmail_password if not user.gmail_user or not user.gmail_password: return -2 @@ -81,7 +84,9 @@ google_docs.copy_gdoc() client.ClientLogin(user.gmail_user, user.gmail_password, client.source, service='writely') resource = gdata.docs.data.Resource(gdata.docs.data.DOCUMENT_LABEL) new_resource = client.post(entry=resource, uri='https://docs.google.com/feeds/default/private/full/') - + print new_resource.__dict__ + print new_resource.resource_id.text + print new_resource.resource_id return self.edit_url_template % (new_resource.resource_id.text,) ''' |
