diff options
| author | Christophe Simonis <chs@odoo.com> | 2015-03-10 18:33:30 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2015-03-10 18:33:30 +0100 |
| commit | 9eccc71a14f31924896fbb09acfac13c90c50fc6 (patch) | |
| tree | c8402ecc257f791582c26f961ce1ef800ede59ad /addons/web/static/src/js/view_form.js | |
| parent | ef020a257424ae9be06201dafe4bf5db66c8c5f5 (diff) | |
| parent | c0496ed03a28e062817dc89450ad77fdcbe30bc6 (diff) | |
[MERGE] forward port of branch 8.0 up to c0496ed
Diffstat (limited to 'addons/web/static/src/js/view_form.js')
| -rw-r--r-- | addons/web/static/src/js/view_form.js | 6 |
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 92e6bf3b766..7284553a422 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -4393,8 +4393,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(); @@ -4411,7 +4411,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; } @@ -4422,9 +4421,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(); |
