[FIX] document: correct numbering of attachments with the same name

bzr revid: chs@openerp.com-20131104110512-an7qpur1zckpgu7z
This commit is contained in:
Christophe Simonis 2013-11-04 12:05:12 +01:00
parent 014fa28379
commit dda51decc8
1 changed files with 1 additions and 1 deletions

View File

@ -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.reverse())
_.chain(attachments)
.groupBy(function(attachment) { return attachment.name})
.each(function(attachment){
if(attachment.length > 1)