Empty value in O2M should remove existing record
The changeset 5efdef4c2c7d wrongly skip the removal of existing record in the group. So it was not possible to remove the last record of the field. issue5878 review34271002
This commit is contained in:
1 parent
37d91cb526
commit
b4900eda05
1 file changed
+3
-2
+3
-2
@@ -1819,10 +1819,11 @@
|
||||
var group = record._values[this.name];
|
||||
var prm = jQuery.when();
|
||||
if (jQuery.isEmptyObject(value)) {
|
||||
return prm;
|
||||
value = [];
|
||||
}
|
||||
var mode;
|
||||
if (!isNaN(parseInt(value[0], 10))) {
|
||||
if (jQuery.isEmptyObject(value) ||
|
||||
!isNaN(parseInt(value[0], 10))) {
|
||||
mode = 'list ids';
|
||||
} else {
|
||||
mode = 'list values';
|
||||
|
||||
Reference in new issue
Block a user