Skip to content

Commit

Permalink
[FIX] web_kanban: _is_quick_create_enabled grouping by day, month or …
Browse files Browse the repository at this point in the history
…year

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

opw:727266
  • Loading branch information
simongoffin committed Apr 25, 2017
1 parent 29bc0d8 commit e25b191
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion addons/web_kanban/static/src/js/kanban_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'))
Expand Down

0 comments on commit e25b191

Please sign in to comment.