[FIX] web: inhibit on change flag when validating editable list
authorDenis Ledoux <dle@odoo.com>
Wed, 5 Nov 2014 12:36:20 +0000 (13:36 +0100)
committerDenis Ledoux <dle@odoo.com>
Wed, 5 Nov 2014 12:38:49 +0000 (13:38 +0100)
To valid all editable list line, we iterate on the lines and set the editor form with the line value, using set_value.
The _inhibit_on_change_flag should be set to True to avoid triggering on changes events

opw-617395

addons/web/static/src/js/view_form.js

index f4dd7ec..cfada94 100644 (file)
@@ -3890,7 +3890,9 @@ instance.web.form.One2ManyListView = instance.web.ListView.extend({
         return _.every(this.records.records, function(record){
             r = record;
             _.each(self.editor.form.fields, function(field){
+                field._inhibit_on_change_flag = true;
                 field.set_value(r.attributes[field.name]);
+                field._inhibit_on_change_flag = false;
             });
             return _.every(self.editor.form.fields, function(field){
                 field.process_modifiers();