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.