[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
This commit is contained in:
Goffin Simon
2017-04-04 15:19:42 +02:00
parent fc0d2e2c83
commit 42e1efded5
@@ -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)