[FIX] web_kanban: many2many_kanban, crash on record creation

When creating a record from a many2many_kanban, it did not contain all
the data the kanban view asked to render itself. This fix extends the
record data with undefined value for unknown (but asked) data.
This commit is contained in:
qsm-odoo
2015-09-04 09:15:56 +02:00
parent 4cb0a3584a
commit fcf9c0c4c9
@@ -96,7 +96,7 @@ var KanbanRecord = Widget.extend({
transform_record: function(record) {
var self = this;
var new_record = {};
_.each(record, function(value, name) {
_.each(_.extend(_.object(_.keys(this.fields), []), record), function(value, name) {
var r = _.clone(self.fields[name] || {});
if ((r.type === 'date' || r.type === 'datetime') && value) {
r.raw_value = time.auto_str_to_date(value);