From 85825293dec87c2a8a3cfe59f4bca354040e07d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20=C3=89vrard?= Date: Thu, 26 Feb 2026 17:07:01 +0100 Subject: [PATCH] Do not set default values for new fields when there is no default Closes #14631 --- sao/src/model.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sao/src/model.js b/sao/src/model.js index 29f8c5a619..f53af4c4c7 100644 --- a/sao/src/model.js +++ b/sao/src/model.js @@ -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(); }); } };