Skip to content
Snippets Groups Projects
Commit cce70fd4 authored by Somesh Khare's avatar Somesh Khare Committed by Martin Trigaux
Browse files

[FIX] document: display Attachment(s) menu only on form view

The attachment menu (list and add) has no effect in tree view (not supporting multi-items upload and display), the menu should then only be displayed in these view (opw 612534)
parent 5872c248
No related branches found
No related tags found
No related merge requests found
......@@ -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.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment