Hello! I hope this post finds you well! I have a model and I'm trying to remove the control panel for the view. I have tried adding a JavaScript like this:
odoo.define('hotel_reservation.QuickRemoveStuff', function (require) {
"use strict";
console.log("well it logs..");
var FormView = require('web.FormView');
var FormRenderer = require('web.FormRenderer');
FormRenderer.include({
render: function () {
if (!this.withControlPanel) {
this.$('.o_form_buttons').addClass('d-none');
}
return this._super.apply(this, arguments);
},
});
var QuickRemoveStuff = FormView.extend({
});
QuickRemoveStuff.prototype.withControlPanel = false;
return {
QuickRemoveStuff: QuickRemoveStuff,
};
});
Now it loads and logs without erros but the control panel still remains.
I also added `renderer="QuickRemoveStuff"` this in xml.
Can someone please give some help on how to seccsfully remove this?