Skip to content

Commit

Permalink
[FIX] web: rounding of fields
Browse files Browse the repository at this point in the history
round_precision expects a decimal (e.g. 0.01) while digits contains the number
of digits (e.g. 2)
replace by round_decimals
  • Loading branch information
mart-e committed Jan 21, 2015
1 parent 495ec92 commit 4f14290
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/web/static/src/js/view_form.js
Original file line number Diff line number Diff line change
Expand Up @@ -2537,7 +2537,7 @@ instance.web.form.FieldFloat = instance.web.form.FieldChar.extend({
value_ = 0;
}
if (this.digits !== undefined && this.digits.length === 2) {
value_ = instance.web.round_precision(value_, this.digits[1]);
value_ = instance.web.round_decimals(value_, this.digits[1]);
}
this._super.apply(this, [value_]);
},
Expand Down

0 comments on commit 4f14290

Please sign in to comment.