From 9932152fae4904e994c74a47f149615b3ca39104 Mon Sep 17 00:00:00 2001 From: "RGA(OpenERP)" <> Date: Tue, 16 Oct 2012 13:00:53 +0530 Subject: [IMP] add counter on google doc when more than one document attached bzr revid: rgaopenerp-20121016073053-nd6s90drak6crs0a --- addons/google_docs/static/src/js/gdocs.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'addons/google_docs/static/src/js') diff --git a/addons/google_docs/static/src/js/gdocs.js b/addons/google_docs/static/src/js/gdocs.js index a1704cde69c..f293447f2ea 100644 --- a/addons/google_docs/static/src/js/gdocs.js +++ b/addons/google_docs/static/src/js/gdocs.js @@ -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); -- cgit v1.2.3