[FIX] web_kanban: _is_quick_create_enabled grouping by day, month or year

When grouping by day, by month or by year on a field date in kanban view,
it raised a traceback.

opw:727266
This commit is contained in:
Goffin Simon
2017-04-25 13:28:46 +02:00
parent 29bc0d811d
commit e25b191b0a
@@ -307,7 +307,8 @@ var KanbanView = View.extend({
return this.fields_view.fields.active;
},
_is_quick_create_enabled: function() {
if(!_.contains(['char', 'boolean', 'many2one'], this.fields[this.group_by_field].type)){
var group_by_field = this.group_by_field.split(':')[0]
if(!_.contains(['char', 'boolean', 'many2one'], this.fields[group_by_field].type)){
return false;
}
if (!this.quick_creatable || !this.is_action_enabled('create'))