I'm working on adding some extra stuffs like in this module on odoo 14.0 pivot view.
I created the template and then inherit the PivotController, the problem is I always get undefined in $node variable when the renderButtons method is called and I could not add the templates (using appendTo) that I have created.
Here is sample of my code :
var PivotController = require('web.PivotController');
PivotController.include({
renderButtons: function ($node) {
var self = this;
var state = self.model.get(self.handle, { raw: true });
var context = state.context || false;
this._super.apply(this, arguments);
var l10n = _t.database.parameters;
if ((context && context.add_company) || (context && context.add_partner)) {
self.$formule_calcul = $(QWeb.render('formule_calcul', {}))
self.$formule_calcul.appendTo($node);
}
},
});
Could you help me?