diff options
| author | Tejas Tank <tta@openerp.com> | 2012-10-23 18:28:04 +0530 |
|---|---|---|
| committer | Tejas Tank <tta@openerp.com> | 2012-10-23 18:28:04 +0530 |
| commit | 8031b99ad4cad6063812fd485080a3af736ac2dd (patch) | |
| tree | 1a1ea525a039318896a31369c26fcab111dbf4a1 /addons/google_docs/google_docs.py | |
| parent | f180333dfa3e67dca5e714ccb61ed04f8b5b39d4 (diff) | |
[IMP] Default resource name as google doc title.
bzr revid: tta@openerp.com-20121023125804-8aohdltduwrhn5wr
Diffstat (limited to 'addons/google_docs/google_docs.py')
| -rw-r--r-- | addons/google_docs/google_docs.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/addons/google_docs/google_docs.py b/addons/google_docs/google_docs.py index f0f6f22a7c5..5d6db04e309 100644 --- a/addons/google_docs/google_docs.py +++ b/addons/google_docs/google_docs.py @@ -61,7 +61,8 @@ class google_docs_ir_attachment(osv.osv): #login with the base account google module client = self._auth(cr, uid, context=context) # create the document in google docs - local_resource = gdata.docs.data.Resource(gdata.docs.data.DOCUMENT_LABEL) + title = context.get("name","Untitled Document.") + local_resource = gdata.docs.data.Resource(gdata.docs.data.DOCUMENT_LABEL,title=title) #create a new doc in Google Docs gdocs_resource = client.post(entry=local_resource, uri='https://docs.google.com/feeds/default/private/full/') # create an ir.attachment into the db @@ -149,7 +150,7 @@ This is the id of the template document, on google side. You can find it thanks *for a presentation (slide show) document with url like `https://docs.google.com/a/openerp.com/presentation/d/123456789/edit#slide=id.p`, the ID is `presentation:123456789` *for a drawing document with url like `https://docs.google.com/a/openerp.com/drawings/d/123456789/edit`, the ID is `drawings:123456789` ... -'''), +''', required=True), 'name_template': fields.char('Google Doc Name Pattern', size=64, help='Choose how the new google docs will be named, on google side', required=True), } |
