changeset 3db1bd08acdc in sao:5.6
details: https://hg.tryton.org/sao?cmd=changeset;node=3db1bd08acdc
description:
        Compare numbers to detect modified

        Depending on the language settings, the input number may remove the 
trailing 0
        (ex: fr). So we must compare the Number instances by stringify them.

        issue9340
        review307611002
        (grafted from c7e1751d1d74fc9d3d0b7189dbb2f009cdc7afdf)
diffstat:

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

diffs (13 lines):

diff -r cacebdea1a6e -r 3db1bd08acdc src/view/form.js
--- a/src/view/form.js  Wed Jun 03 22:14:16 2020 +0200
+++ b/src/view/form.js  Thu May 28 18:16:23 2020 +0200
@@ -1795,7 +1795,8 @@
         get modified() {
             if (this.record && this.field) {
                 var value = this.get_client_value();
-                return value != this.get_value();
+                return (JSON.stringify(this.field.convert(value)) !=
+                    JSON.stringify(this.field.convert(this.get_value())));
             }
             return false;
         },

Reply via email to