changeset c7e1751d1d74 in sao:default
details: https://hg.tryton.org/sao?cmd=changeset;node=c7e1751d1d74
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
diffstat:

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

diffs (13 lines):

diff -r ec6df070ea18 -r c7e1751d1d74 src/view/form.js
--- a/src/view/form.js  Thu May 28 18:14:50 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