Do not set default values for new fields when there is no default
Closes #14631
This commit is contained in:
+5
-3
@@ -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();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user