Remove old record in One2Many._set_value only if it is not in the new value

Always removing previous record makes the parent record being wrongly
considered as modified.

issue6044
review34451002
This commit is contained in:
Cédric Krier committed 2016-11-21 20:59:33 +01:00
1 parent 239470c997
commit eb95cbeeff
1 file changed
+3 -1
+3 -1
View File
@@ -1898,7 +1898,9 @@
if (mode == 'list ids') {
for (var i = 0, len = group.length; i < len; i++) {
var old_record = group[i];
group.remove(old_record, true);
if (!~value.indexOf(old_record.id)) {
group.remove(old_record, true);
}
}
group.load(value);
} else {