[FIX] web_pivot_computed_measure: Error when computed measure takes Infinity value

pull/2508/head
Carlos Roca 2023-06-07 10:21:05 +02:00
parent 87346ebe1c
commit d41d38702b
1 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,15 @@
/** @odoo-module **/
/* Copyright 2022 Tecnativa - Carlos Roca
* License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html) */
import {PivotRenderer} from "@web/views/pivot/pivot_renderer";
import {patch} from "web.utils";
patch(PivotRenderer.prototype, "web_pivot_computed_measure.PivotRenderer", {
getFormattedValue(cell) {
if (cell.value === Infinity) {
return "-";
}
return this._super(...arguments);
},
});