From 42e1efded573f59f8f02eaee9761fa21fd6182e9 Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Mon, 3 Apr 2017 16:34:48 +0200 Subject: [PATCH] [FIX] web_kanban: column_add_record When grouping by a field datetime in kanban view, the name of the column is an abreviated datetime. Afterwards, when making a quick create, the abreviated datime was set in the context and used as default value. So it raised a tracebacks because the value of the datetime was not in the correct format. Now it's only possible to make a quick create if the type of the field grouped is a char, a boolean or a many2one. opw:727266 --- addons/web_kanban/static/src/js/kanban_view.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addons/web_kanban/static/src/js/kanban_view.js b/addons/web_kanban/static/src/js/kanban_view.js index 9abe29c7b64..1f84525eee6 100644 --- a/addons/web_kanban/static/src/js/kanban_view.js +++ b/addons/web_kanban/static/src/js/kanban_view.js @@ -307,6 +307,9 @@ var KanbanView = View.extend({ return this.fields.active; }, _is_quick_create_enabled: function() { + if(!_.contains(['char', 'boolean', 'many2one'], this.fields[this.group_by_field].type)){ + return false; + } if (!this.quick_creatable || !this.is_action_enabled('create')) return false; if (this.fields_view.arch.attrs.quick_create !== undefined)