From 698138ca3f0c7791081cc02bc61ff9b3a98819ab Mon Sep 17 00:00:00 2001 From: Enric Tobella Date: Thu, 16 Jul 2020 10:57:09 +0200 Subject: [PATCH] [IMP] kpi_dashboard: Add standard elements on code --- kpi_dashboard/models/kpi_kpi.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kpi_dashboard/models/kpi_kpi.py b/kpi_dashboard/models/kpi_kpi.py index 423fc4e5..795eab19 100644 --- a/kpi_dashboard/models/kpi_kpi.py +++ b/kpi_dashboard/models/kpi_kpi.py @@ -6,8 +6,10 @@ from odoo.exceptions import ValidationError import ast from odoo.tools.safe_eval import safe_eval from odoo.addons.base.models.ir_cron import _intervalTypes +from odoo.tools.float_utils import float_compare import re import json +import datetime class KpiKpi(models.Model): @@ -132,6 +134,8 @@ class KpiKpi(models.Model): return { "self": self, "model": self.browse(), + "datetime": datetime, + "float_compare": float_compare, } def _forbidden_code(self):