Browse Source

Merge pull request #166 from acsone/8.0-forward-port-sbi

[8.0] mis_builder forward port of 7.0 fix
pull/167/head
Pedro M. Baeza 9 years ago
parent
commit
631e6d98e0
  1. 2
      mis_builder/models/mis_builder.py

2
mis_builder/models/mis_builder.py

@ -514,6 +514,7 @@ class MisReportInstancePeriod(models.Model):
kpi_val_comment = kpi.name + " = " + kpi.expression
kpi_eval_expression = aep.replace_expr(kpi.expression)
kpi_val = safe_eval(kpi_eval_expression, localdict)
localdict[kpi.name] = kpi_val
except ZeroDivisionError:
kpi_val = None
kpi_val_rendered = '#DIV/0'
@ -530,7 +531,6 @@ class MisReportInstancePeriod(models.Model):
else:
kpi_val_rendered = kpi.render(lang_id, kpi_val)
localdict[kpi.name] = kpi_val
try:
kpi_style = None
if kpi.css_style:

Loading…
Cancel
Save