Arnaud Pineux (OpenERP) has proposed merging lp:~openerp-dev/openobject-addons/7.0-google_drive-api into lp:openobject-addons/7.0.
Requested reviews: qdp (OpenERP) (qdp) For more details, see: https://code.launchpad.net/~openerp-dev/openobject-addons/7.0-google_drive-api/+merge/142508 The google doc module has been updated with the old and the new google doc api. Must be tested on laptop with old version -- https://code.launchpad.net/~openerp-dev/openobject-addons/7.0-google_drive-api/+merge/142508 Your team OpenERP R&D Team is subscribed to branch lp:~openerp-dev/openobject-addons/7.0-google_drive-api.
=== modified file 'google_docs/google_docs.py' --- google_docs/google_docs.py 2012-12-27 11:43:33 +0000 +++ google_docs/google_docs.py 2013-01-09 13:10:42 +0000 @@ -94,11 +94,16 @@ client = self._auth(cr, uid) # fetch and copy the original document try: - doc = client.GetDoc(gdoc_template_id) + original_resource = client.get_resource_by_id(gdoc_template_id) #copy the document you choose in the configuration - 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.")) + copy_resource = client.copy_resource(original_resource, name_gdocs) + except: + try: + doc = client.GetDoc(gdoc_template_id) + #copy the document you choose in the configuration + 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 self.create(cr, uid, { 'res_model': res_model,
_______________________________________________ Mailing list: https://launchpad.net/~openerp-dev-gtk Post to : openerp-dev-gtk@lists.launchpad.net Unsubscribe : https://launchpad.net/~openerp-dev-gtk More help : https://help.launchpad.net/ListHelp