[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
This commit is contained in:
@@ -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]) {
|
||||
|
||||
Reference in New Issue
Block a user