[FIX] web_kanban: display add button for many2many kanban view

This commit is contained in:
Christophe Matthieu
2015-04-15 13:31:20 +02:00
parent c35dcb378f
commit 64ce3df5d7
2 changed files with 5 additions and 1 deletions
@@ -1967,6 +1967,10 @@ odoo.define('web_kanban.Many2ManyKanbanView', function (require) {
});
var Many2ManyKanbanView = KanbanView.extend({
load_kanban: function(data) {
this._super(data);
this.render_buttons();
},
get_quick_create_class: function () {
return Many2ManyQuickCreate;
},
@@ -13,7 +13,7 @@
</div>
</t>
<t t-name="KanbanView.buttons">
<t t-if="widget.options.action_buttons !== false and widget.is_action_enabled('create')">
<t t-if="(widget.options.action_buttons !== false and widget.is_action_enabled('create')) or (!widget.view_id and !widget.options.read_only_mode and (widget.is_action_enabled('write') || widget.is_action_enabled('create')))">
<div class="oe_kanban_buttons">
<button type="button" class="oe_kanban_button_new btn btn-primary btn-sm">
<t t-esc="widget.options.create_text || _t('Create')"/>