Do not set default values for new fields when there is no default

Closes #14631
This commit is contained in:
Nicolas Évrard
2026-02-26 17:07:01 +01:00
parent 667a53be21
commit 85825293de
+5 -3
View File
@@ -379,10 +379,12 @@
if (new_.length && added.length) {
this.model.execute('default_get', [added, this.context])
.then(values => {
for (const record of new_) {
record.set_default(values, true, false);
if (!jQuery.isEmptyObject(values)) {
for (const record of new_) {
record.set_default(values, true, false);
}
this.record_modified();
}
this.record_modified();
});
}
};