[FIX] web: pass buttons_template as parameter of KanbanController

Before buttons_template couldn't be passed as parameter, which prevented
from changing the button template used when rendering the button
This commit is contained in:
Louis Baudoux
2019-02-12 11:00:18 +00:00
parent 5fa651cb01
commit da4cb0acb5
@@ -18,6 +18,7 @@ var _t = core._t;
var qweb = core.qweb;
var KanbanController = BasicController.extend({
buttons_template: 'KanbanView.buttons',
custom_events: _.extend({}, BasicController.prototype.custom_events, {
quick_create_add_column: '_onAddColumn',
quick_create_record: '_onQuickCreateRecord',
@@ -78,7 +79,7 @@ var KanbanController = BasicController.extend({
*/
renderButtons: function ($node) {
if (this.hasButtons && this.is_action_enabled('create')) {
this.$buttons = $(qweb.render('KanbanView.buttons', {
this.$buttons = $(qweb.render(this.buttons_template, {
btnClass: 'btn-primary',
widget: this,
}));