From b6472c7a7136fb9c617f742d283f03f04cc7987e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 1 Aug 2025 10:20:59 +0200 Subject: [PATCH] Ensure date in log window is always a string The date can be null for example for record having been just created without any modification later. Closes #14142 --- sao/src/window.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sao/src/window.js b/sao/src/window.js index 4413dfbaf6..cc6dce8430 100644 --- a/sao/src/window.js +++ b/sao/src/window.js @@ -935,12 +935,14 @@ if (date) { date = Sao.common.format_datetime( Sao.common.date_format() + ' %H:%M:%S', date); + } else { + date = ''; } input = jQuery('', { 'readonly': true, 'class': 'form-control input-sm', 'aria-labelledby': label.attr('id'), - }).val(date || '').appendTo(cell); + }).val(date).appendTo(cell); input.css('width', date.length + 'ch'); input.uniqueId(); });