[FIX] view form: Use digits to round float values on client side

This commit is contained in:
Adrien Peiffer
2015-01-21 10:38:32 +01:00
committed by Géry Debongnie
parent 124e476943
commit 37e85a1e35
+3
View File
@@ -2536,6 +2536,9 @@ instance.web.form.FieldFloat = instance.web.form.FieldChar.extend({
// As in GTK client, floats default to 0
value_ = 0;
}
if (this.digits !== undefined && this.digits.length === 2) {
value_ = instance.web.round_precision(value_, this.digits[1]);
}
this._super.apply(this, [value_]);
},
focus: function () {