details:   https://code.tryton.org/tryton/commit/b68c5ba13650
branch:    7.0
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
        (grafted from 759ffbf53e83eb67855b929aaf0274826e1b1fb5)
diffstat:

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

diffs (17 lines):

diff -r 96b6d4d04bfc -r b68c5ba13650 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
@@ -4252,11 +4252,12 @@
                 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) {
                     filename_field.set_client(record, filename);
                 }
+                this.input_select.val(undefined);
             }, !field.get_size);
         },
         open: function() {

Reply via email to