Arnaud Pineux (OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-bug-1084509-api into
lp:openobject-addons.
Requested reviews:
qdp (OpenERP) (qdp)
Olivier Dony (OpenERP) (odo-openerp)
Related bugs:
Bug #1084509 in OpenERP Addons: "[7.0] Google Docs integration broken"
https://bugs.launchpad.net/openobject-addons/+bug/1084509
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-1084509-api/+merge/137569
Wrong function were used to get the google document and to copy it.
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-1084509-api/+merge/137569
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-bug-1084509-api.
=== modified file 'google_docs/google_docs.py'
--- google_docs/google_docs.py 2012-11-01 07:26:31 +0000
+++ google_docs/google_docs.py 2012-12-03 13:57:25 +0000
@@ -90,10 +90,10 @@
#login with the base account google module
client = self._auth(cr, uid)
# fetch and copy the original document
+ doc = client.GetDoc(gdoc_template_id)
+ #copy the document you choose in the configuration
try:
- original_resource = client.get_resource_by_id(gdoc_template_id)
- #copy the document you choose in the configuration
- copy_resource = client.copy_resource(original_resource, name_gdocs)
+ 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
=== modified file 'google_docs/static/src/js/gdocs.js'
--- google_docs/static/src/js/gdocs.js 2012-11-15 12:38:51 +0000
+++ google_docs/static/src/js/gdocs.js 2012-12-03 13:57:25 +0000
@@ -16,7 +16,7 @@
var view = self.getParent();
var ids = ( view.fields_view.type != "form" )? view.groups.get_selection().ids : [ view.datarecord.id ];
if( !_.isEmpty(ids) ){
- view.sidebar_context().done(function (context) {
+ view.sidebar_eval_context().done(function (context) {
var ds = new instance.web.DataSet(this, 'ir.attachment', context);
ds.call('google_doc_get', [view.dataset.model, ids, context]).done(function(r) {
if (r == 'False') {
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp