summaryrefslogtreecommitdiff
path: root/addons/document/static
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2014-09-05 15:28:22 +0200
committerChristophe Simonis <chs@odoo.com>2014-09-05 15:28:22 +0200
commit31bf30d2d0eb78baaa36360b99fe58bf7cd4c9e7 (patch)
treed7be61ecd6bb4c8b5552e39b03e2a64eebbbf323 /addons/document/static
parentafba9e8817c458640ae446ac7aaaab79be4fe1e9 (diff)
parented1c173971968eaa96693cb4e1547efa6e6c34e0 (diff)
[MERGE] forward port of branch 8.0 up to ed1c173
Diffstat (limited to 'addons/document/static')
-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.