[FIX] Document name and google doc index.
bzr revid: tta@openerp.com-20121025073834-0tcjrqe8p7n3m2yx
This commit is contained in:
@@ -9,7 +9,7 @@ openerp.document = function (instance) {
|
||||
on_attachments_loaded: function(attachments) {
|
||||
//to display number in name if more then one attachment which has same name.
|
||||
var self = this;
|
||||
_.chain(attachments)
|
||||
_.chain(attachments.reverse())
|
||||
.groupBy(function(attachment) { return attachment.name})
|
||||
.each(function(attachment){
|
||||
if(attachment.length > 1)
|
||||
|
||||
@@ -90,7 +90,7 @@ class google_docs_ir_attachment(osv.osv):
|
||||
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, 'copy_%s' % original_resource.title.text)
|
||||
copy_resource = client.copy_resource(original_resource, 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
|
||||
|
||||
Reference in New Issue
Block a user