Browse Source

[IMP] kpi_dashboard: Add standard elements on code

myc-14.0-py3o
Enric Tobella 4 years ago
parent
commit
698138ca3f
  1. 4
      kpi_dashboard/models/kpi_kpi.py

4
kpi_dashboard/models/kpi_kpi.py

@ -6,8 +6,10 @@ from odoo.exceptions import ValidationError
import ast import ast
from odoo.tools.safe_eval import safe_eval from odoo.tools.safe_eval import safe_eval
from odoo.addons.base.models.ir_cron import _intervalTypes from odoo.addons.base.models.ir_cron import _intervalTypes
from odoo.tools.float_utils import float_compare
import re import re
import json import json
import datetime
class KpiKpi(models.Model): class KpiKpi(models.Model):
@ -132,6 +134,8 @@ class KpiKpi(models.Model):
return { return {
"self": self, "self": self,
"model": self.browse(), "model": self.browse(),
"datetime": datetime,
"float_compare": float_compare,
} }
def _forbidden_code(self): def _forbidden_code(self):

Loading…
Cancel
Save