# Remove action button from tree view and form view.
var Sidebar = require('web.Sidebar');
Sidebar.include({
init : function(){
this._super.apply(this, arguments);
var view = this.getParent();
var self = this;
if (view.fields_view && view.fields_view.type === "form") {
self.sections.splice(1, 2);
}
if (view.fields_view && view.fields_view.type === "tree") {
self.sections.splice(1, 2);
}
},
});
var Sidebar = require('web.Sidebar');
Sidebar.include({
init : function(){
this._super.apply(this, arguments);
var view = this.getParent();
var self = this;
if (view.fields_view && view.fields_view.type === "form") {
self.sections.splice(1, 2);
}
if (view.fields_view && view.fields_view.type === "tree") {
self.sections.splice(1, 2);
}
},
});
No comments:
Post a Comment