summaryrefslogtreecommitdiff
path: root/addons/document/static/src/js
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2014-09-04 18:03:24 +0200
committerChristophe Simonis <chs@odoo.com>2014-09-04 18:03:24 +0200
commit41afeec7f14a2bafb976770afe76d24e15b13df6 (patch)
tree599c293f9f4999f10e8b8bbea146c764f30f575b /addons/document/static/src/js
parent2d9ddce327eb818dd6631b1bf1efb50f9be22540 (diff)
parent9363bc9182b3eb70980b3a80e3ea2d4809f44840 (diff)
[MERGE] forward port of branch saas-5 up to 9363bc9
Diffstat (limited to 'addons/document/static/src/js')
-rw-r--r--addons/document/static/src/js/document.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/addons/document/static/src/js/document.js b/addons/document/static/src/js/document.js
index e4bce2da76e..5b353d5b0dd 100644
--- a/addons/document/static/src/js/document.js
+++ b/addons/document/static/src/js/document.js
@@ -3,8 +3,10 @@ openerp.document = function (instance) {
instance.web.Sidebar.include({
init : function(){
this._super.apply(this, arguments);
- this.sections.splice(1, 0, { 'name' : 'files', 'label' : _t('Attachment(s)'), });
- this.items['files'] = [];
+ if (this.getParent().view_type == "form"){
+ this.sections.splice(1, 0, { 'name' : 'files', 'label' : _t('Attachment(s)'), });
+ this.items['files'] = [];
+ }
},
on_attachments_loaded: function(attachments) {
//to display number in name if more then one attachment which has same name.