[IMP] add counter on google doc when more than one document attached
bzr revid: rgaopenerp-20121016073053-nd6s90drak6crs0a
This commit is contained in:
parent
c9f02f6dd9
commit
9932152fae
|
@ -3,6 +3,13 @@ var QWeb = instance.web.qweb,
|
|||
_t = instance.web._t;
|
||||
|
||||
instance.web.Sidebar = instance.web.Sidebar.extend({
|
||||
on_attachments_loaded: function(attachments) {
|
||||
var self = this;
|
||||
_.chain(attachments)
|
||||
.filter(function(attachment){ if (attachment.name ==='Google Doc') return true})
|
||||
.map(function(attachment, i){ attachment.name = _.str.sprintf(_t("%s (%s)"), attachment.name, i+1)})
|
||||
self._super(attachments);
|
||||
},
|
||||
redraw: function() {
|
||||
var self = this;
|
||||
this._super.apply(this, arguments);
|
||||
|
|
Loading…
Reference in New Issue