changeset faa554769918 in sao:5.4
details: https://hg.tryton.org/sao?cmd=changeset;node=faa554769918
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 bc8be7b0f9ea -r faa554769918 src/view/form.js
--- a/src/view/form.js Wed Jun 03 22:14:56 2020 +0200
+++ b/src/view/form.js Thu May 28 18:16:23 2020 +0200
@@ -1605,7 +1605,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;
},