From 46f911be2a196bf15dd9d3232bbc3e0e25cde4f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 28 May 2020 18:16:23 +0200 Subject: [PATCH] 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 --- src/view/form.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/view/form.js b/src/view/form.js index d906340f00..a4efc0f607 100644 --- a/src/view/form.js +++ b/src/view/form.js @@ -1795,7 +1795,8 @@ function eval_pyson(value){ 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; },