diff options
| author | Vijaykumar Baladaniya <vba@tinyerp.com> | 2012-10-16 15:17:01 +0530 |
|---|---|---|
| committer | Vijaykumar Baladaniya <vba@tinyerp.com> | 2012-10-16 15:17:01 +0530 |
| commit | 6b26d79a8880ecd2d85582990acf9f27ebda20a4 (patch) | |
| tree | 5f4e5a8f294f1ed04ba3332527db333e54364259 /addons/google_docs | |
| parent | 10c47d70c270bd19cbac4e43e8c9b136b42bae80 (diff) | |
| parent | 9932152fae4904e994c74a47f149615b3ca39104 (diff) | |
[MERGE]Merge with trunk-google-doc-imp-rga.
bzr revid: vba@tinyerp.com-20121016094701-6ks4nmy38b09j3hl
Diffstat (limited to 'addons/google_docs')
| -rw-r--r-- | addons/google_docs/static/src/js/gdocs.js | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/addons/google_docs/static/src/js/gdocs.js b/addons/google_docs/static/src/js/gdocs.js index 0e5583fa953..ac19e4cc6e7 100644 --- a/addons/google_docs/static/src/js/gdocs.js +++ b/addons/google_docs/static/src/js/gdocs.js @@ -3,12 +3,20 @@ 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); self.$el.find('.oe_sidebar_add_attachment').after(QWeb.render('Google_doc', {widget: self})) self.$el.find('.oe_sidebar_add_google_doc').on('click', function (e) { - self.on_google_doc(); + self.on_google_doc(); }); }, on_google_doc: function() { @@ -27,6 +35,7 @@ var QWeb = instance.web.qweb, modal: true, }); } + }).done(function(){ form.reload(); }); }); |
