Browse Source

[IMP] kpi_dashboard: Add standard elements on code

12.0
Enric Tobella 4 years ago
parent
commit
b2638fcfc4
No known key found for this signature in database GPG Key ID: D76663C0B4023597
  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