[FIX] web: error on change value in o2m after an other field onchange if the o2m contains o2m
o2m editable list open a form view and can put command as default value (record[this.name] for o2m in a o2m) for the editable fields. When the onchange is triggered, get_value create a wrong command of command. step to reproduce issue: * edit a quotation with at least on sale order line * change the pricelist * change the quantity of the sale order line todo : remove _on_load_record in version > 9.0 and use new dataset implementation with to_delete attribute
This commit is contained in:
@@ -466,7 +466,7 @@ var AbstractManyField = common.AbstractField.extend({
|
||||
this.starting_ids = [];
|
||||
// don't set starting_ids for the new record
|
||||
if (record.id && record[this.name] && (!isNaN(record.id) || record.id.indexOf(this.dataset.virtual_id_prefix) === -1)) {
|
||||
this.starting_ids = record[this.name].slice();
|
||||
this.starting_ids = this.get('value').slice();
|
||||
}
|
||||
this.trigger("load_record", record);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user