summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js
diff options
context:
space:
mode:
authorlen-odoo <len@odoo.com>2018-07-11 18:20:18 +0200
committerlen-odoo <35492570+len-odoo@users.noreply.github.com>2018-07-19 13:19:09 +0200
commitbc12428e174dcba94d86e855cbeba0e77da9b747 (patch)
tree37dd946d90fa86ca73b790ef6eca615c235c15e6 /addons/web/static/src/js
parent487873f170d50ec6f6f625dbacc85680bd32e7bf (diff)
[FIX] web: format value of statinfo widget
The value of the statinfo widget is rendered by the qweb after a t-esc. Say if the python rounding returned 14.0000000001 (supposed to be a two digits precision number through the magic of floats) then the statinfo widget would print it as-is. We now format the value at assignation. opw 1865426
Diffstat (limited to 'addons/web/static/src/js')
-rw-r--r--addons/web/static/src/js/fields/basic_fields.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web/static/src/js/fields/basic_fields.js b/addons/web/static/src/js/fields/basic_fields.js
index 4e083d3f0c8..ee52f4a27e5 100644
--- a/addons/web/static/src/js/fields/basic_fields.js
+++ b/addons/web/static/src/js/fields/basic_fields.js
@@ -1759,7 +1759,7 @@ var StatInfo = AbstractField.extend({
*/
_render: function () {
var options = {
- value: this.value || 0,
+ value: this._formatValue(this.value || 0),
};
if (! this.attrs.nolabel) {
if (this.nodeOptions.label_field && this.recordData[this.nodeOptions.label_field]) {