[FIX] web: one2many list

Error when click on other record after an update on a one2many record in list editable which have an 'add an item' by checkbox selection
This commit is contained in:
Christophe Matthieu
2015-06-17 18:22:21 +02:00
parent 0cf516f860
commit 26a5ef4f7c
2 changed files with 6 additions and 3 deletions
+1 -1
View File
@@ -773,7 +773,7 @@ var BufferedDataSet = DataSetStatic.extend({
$.extend(cached.values, _.extend({}, record.values, (options || {}).readonly_fields || {}));
if (dirty)
this.trigger("dataset_changed", id, data, options);
return $.Deferred().resolve(true).promise();
return $.Deferred().resolve(data).promise();
},
unlink: function(ids, callback, error_callback) {
var self = this;
@@ -1444,9 +1444,12 @@ var FieldMany2Many = AbstractManyField.extend(common.ReinitializeFieldMixin, {
},
render_value: function() {
var self = this;
//this.dataset.set_ids(this.get('value') || []);
var time;
this.render_value_dm.add(this.is_loaded).then(function() {
return self.list_view.reload_content();
clearTimeout(time);
time = setTimeout(function () {
self.list_view.reload_content();
}, 0);
});
}
});