details:   https://code.tryton.org/tryton/commit/759ffbf53e83
branch:    default
user:      Cédric Krier <[email protected]>
date:      Mon Jul 27 10:59:31 2026 +0200
description:
        Clear the value of input select once data has been read

        The display does not clear the input if the current record is changed 
so we
        must ensure that the input is always empty once file has been selected.

        Closes #14482
diffstat:

 sao/src/view/form.js |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (20 lines):

diff -r 73b5636cf6ab -r 759ffbf53e83 sao/src/view/form.js
--- a/sao/src/view/form.js      Fri Jul 24 16:10:12 2026 +0200
+++ b/sao/src/view/form.js      Mon Jul 27 10:59:31 2026 +0200
@@ -4619,7 +4619,7 @@
                 field = this.field,
                 filename_field = this.filename_field;
 
-            Sao.common.get_input_data(this.input_select, function(data, 
filename) {
+            Sao.common.get_input_data(this.input_select, (data, filename) => {
                 field.set_client(record, data);
                 if (filename_field) {
                     let ext = field.description.filename_ext
@@ -4630,6 +4630,7 @@
                     }
                     filename_field.set_client(record, filename);
                 }
+                this.input_select.val(undefined);
             }, !field.get_size);
         },
         select_drop: function(evt) {

Reply via email to