From 9830bc67892087e8e32bf7d5ac16a48a844ab3ca Mon Sep 17 00:00:00 2001 From: kais-odoo Date: Tue, 19 Sep 2023 12:46:38 +0530 Subject: [PATCH] [FIX] web: trackback when formatFloat value is undefined steps to produce: - when measure field value set null if value is zero. - try to open cohort/graph view measure. - trackback occurs 'value.toFixed is not a function'. Fix: This commit, fixes the trackback when the measure value is null or undefined. It occurs when the measure field value is null in a particular condition. closes odoo/odoo#135207 Task: 3502869 Related: odoo/enterprise#47572 Signed-off-by: Xavier Bol (xbo) --- addons/web/static/src/views/graph/graph_renderer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web/static/src/views/graph/graph_renderer.js b/addons/web/static/src/views/graph/graph_renderer.js index b290f9241a8..ea9fa6afd2a 100644 --- a/addons/web/static/src/views/graph/graph_renderer.js +++ b/addons/web/static/src/views/graph/graph_renderer.js @@ -2,7 +2,7 @@ import { _t } from "@web/core/l10n/translation"; import { getBorderWhite, DEFAULT_BG, getColor, hexToRGBA } from "@web/core/colors/colors"; -import { formatFloat } from "@web/core/utils/numbers"; +import { formatFloat } from "@web/views/fields/formatters"; import { SEP } from "./graph_model"; import { sortBy } from "@web/core/utils/arrays"; import { loadJS } from "@web/core/assets";