From dec2b0da9fb1b096bcdc689ea4fbc275b869f152 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 28 Mar 2025 16:04:21 +0100 Subject: [PATCH] Check for new record only when saving an actual current record 49cbc9b99ed8 added the calculation of a new variable but before the test that a current record is actually being saved. Closes #13946 (grafted from 383b2df462a149197e6e795d595aa3ae1d07f611) --HG-- branch : 6.0 --- sao/src/screen.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sao/src/screen.js b/sao/src/screen.js index 2a27130fe1..e6819546d7 100644 --- a/sao/src/screen.js +++ b/sao/src/screen.js @@ -1568,7 +1568,6 @@ }, save_current: function() { var current_record = this.current_record; - let new_record = current_record.id < 0; if (!current_record) { if (this.current_view && (this.current_view.view_type == 'tree') && @@ -1579,6 +1578,7 @@ return jQuery.when(); } } + let new_record = current_record.id < 0; if (this.current_view) { this.current_view.set_value(); var fields = this.current_view.get_fields();