Use stringified field value to compare for change
Decimal uses an instance of Number to be different with Float but instance comparison doesn't work in javascript, so a JSON string must be used.
This commit is contained in:
1 parent
aef4813e49
commit
4864cb8f67
1 file changed
+3
-1
+3
-1
@@ -927,7 +927,9 @@
|
||||
set_client: function(record, value, force_change) {
|
||||
var previous_value = this.get(record);
|
||||
this.set(record, value);
|
||||
if (previous_value != this.get(record)) {
|
||||
// Use stringify to compare object instance like Number for Decimal
|
||||
if (JSON.stringify(previous_value) !=
|
||||
JSON.stringify(this.get(record))) {
|
||||
record._changed[this.name] = true;
|
||||
this.changed(record).done(function() {
|
||||
// TODO parent
|
||||
|
||||
Reference in new issue
Block a user