summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2015-03-10 17:51:16 +0100
committerChristophe Simonis <chs@odoo.com>2015-03-10 17:51:16 +0100
commitf8a94057e5993f5d80ce8fa6acc7a4365b2adbe4 (patch)
tree438bda65f5f872463273641bc21aca9c81629071 /addons/web/static/src
parent4a3c4713e92289ba55bcca287f77483621efee16 (diff)
parenta5e32690b054d3c5d68bc33bf1bf7336d075dc2b (diff)
[MERGE] forward port of branch 7.0 up to a5e3269
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();