summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
Diffstat (limited to 'addons/web/static/src')
-rw-r--r--addons/web/static/src/js/view_form.js6
1 files changed, 2 insertions, 4 deletions
diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js
index 35cc52ad1dd..321611dd398 100644
--- a/addons/web/static/src/js/view_form.js
+++ b/addons/web/static/src/js/view_form.js
@@ -4097,8 +4097,8 @@ instance.web.form.One2ManyListView = instance.web.ListView.extend({
this.records
.bind('add', this.proxy("changed_records"))
- .bind('edit', this.proxy("changed_records"))
.bind('remove', this.proxy("changed_records"));
+ this.on('save:after', this, this.proxy("changed_records"));
},
start: function () {
var ret = this._super();
@@ -4115,7 +4115,6 @@ instance.web.form.One2ManyListView = instance.web.ListView.extend({
if (!this.fields_view || !this.editable()){
return true;
}
- var r;
if (_.isEmpty(this.records.records)){
return true;
}
@@ -4126,9 +4125,8 @@ instance.web.form.One2ManyListView = instance.web.ListView.extend({
current_values[field.name] = field.get('value');
});
var valid = _.every(this.records.records, function(record){
- r = record;
_.each(self.editor.form.fields, function(field){
- field.set_value(r.attributes[field.name]);
+ field.set_value(record.attributes[field.name]);
});
return _.every(self.editor.form.fields, function(field){
field.process_modifiers();