summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views
diff options
context:
space:
mode:
authorChristophe Matthieu <chm@odoo.com>2015-10-16 15:47:58 +0200
committerChristophe Matthieu <chm@odoo.com>2015-10-26 19:27:34 +0100
commit07ce3cd4d1bb300972ab02e3613819890bc0b630 (patch)
tree92d7ffc44e26ca7d1f20798a6a79be0efc0065d6 /addons/web/static/src/js/views
parent34e90a44f837ad5c1bd9411d10208ce255a745f0 (diff)
[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
Diffstat (limited to 'addons/web/static/src/js/views')
-rw-r--r--addons/web/static/src/js/views/form_relational_widgets.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web/static/src/js/views/form_relational_widgets.js b/addons/web/static/src/js/views/form_relational_widgets.js
index 1f1e7351005..0ff95ca9448 100644
--- a/addons/web/static/src/js/views/form_relational_widgets.js
+++ b/addons/web/static/src/js/views/form_relational_widgets.js
@@ -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);
},