diff options
| author | MVA <mva@openerp.com> | 2012-03-28 12:10:15 +0200 |
|---|---|---|
| committer | MVA <mva@openerp.com> | 2012-03-28 12:10:15 +0200 |
| commit | 774aa481c2f60df74d8b01f03b00cad002d8e105 (patch) | |
| tree | 99bae5b9b227bc33dcc5c56d84816236812422b1 /addons/google_docs | |
| parent | 3ec3ced2a61c617ccac91869309cae02964489f0 (diff) | |
[IMP] correct the copy with the good document title
bzr revid: mva@openerp.com-20120328101015-4v1fit8z3cno9y91
Diffstat (limited to 'addons/google_docs')
| -rw-r--r-- | addons/google_docs/google_docs.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/addons/google_docs/google_docs.py b/addons/google_docs/google_docs.py index 13d9634dcf8..1e6071cd716 100644 --- a/addons/google_docs/google_docs.py +++ b/addons/google_docs/google_docs.py @@ -78,16 +78,17 @@ class google_docs_ir_attachment(osv.osv): def copy_gdoc(self, cr, uid, model, google_res_id, ids,context=None): client = self._auth(cr, uid) # fetch and copy the original document + print 'test' original_resource = client.get_resource_by_id(google_res_id) - #copy the document you choose in the configuration - copy_resource = client.copy_resource(original_resource,'copy_foo') + #copy the document you choose in the configuration + copy_resource = client.copy_resource(original_resource,'copy_%s' % original_resource.title.text) # register into the db self.create(cr, uid, { 'res_model': model, 'res_id': ids[0], 'type': 'url', - 'name': 'copy_%s' % gdocs_resource.title.text, + 'name': 'copy_%s' % original_resource.title.text, 'url': copy_resource.get_alternate_link().href },context=context) |
