summaryrefslogtreecommitdiff
path: root/addons/google_docs
diff options
context:
space:
mode:
authorMVA <mva@openerp.com>2012-03-28 11:34:56 +0200
committerMVA <mva@openerp.com>2012-03-28 11:34:56 +0200
commit2f1baf8f40908b54db0950f596fbe98e35d7cf9a (patch)
tree4a39129900aed4be35e5bf5ee51585d9cf6bc61e /addons/google_docs
parent3590c952ec73a4b933dfac889ffb20838475f345 (diff)
[IMP] replace the static name in the document name
bzr revid: mva@openerp.com-20120328093456-7wgnnvizvg0r747i
Diffstat (limited to 'addons/google_docs')
-rw-r--r--addons/google_docs/google_docs.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/addons/google_docs/google_docs.py b/addons/google_docs/google_docs.py
index bba8524023a..8c882a3422a 100644
--- a/addons/google_docs/google_docs.py
+++ b/addons/google_docs/google_docs.py
@@ -61,13 +61,13 @@ class google_docs_ir_attachment(osv.osv):
local_resource = gdata.docs.data.Resource(gdata.docs.data.DOCUMENT_LABEL)
#create a new doc in Google Docs
gdocs_resource = client.post(entry=local_resource, uri='https://docs.google.com/feeds/default/private/full/')
- name = gdocs_resource.title
+
# register into the db
self.create(cr, uid, {
'res_model': model,
'res_id': ids[0],
'type': 'url',
- 'name': name,
+ 'name': ('new_%s' % gdocs_resource.title.text),
'url': gdocs_resource.get_alternate_link().href,
},context=context)
@@ -86,8 +86,7 @@ class google_docs_ir_attachment(osv.osv):
'res_model': model,
'res_id': ids[0],
'type': 'url',
- 'name': 'file_name',
- 'name': 'copy_foo' , #TODO pending from the working config
+ 'name': 'copy_%s' % gdocs_resource.title.text,
'url': copy_resource.get_alternate_link().href
},context=context)