mirror of
https://github.com/OCA/web.git
synced 2025-02-22 13:21:25 +02:00
[FIX] web_pivot_computed_measure: Error when computed measure takes Infinity value
This commit is contained in:
@@ -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);
|
||||||
|
},
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user