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

This commit is contained in:
Adrien Peiffer 2015-01-07 08:40:44 +01:00 committed by Géry Debongnie
parent 124e476943
commit 37e85a1e35
1 changed files with 3 additions and 0 deletions

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 () {