Browse Source

[IMP] mis_buidler: avoid non-sense % comparisons with base value close to 0

pull/90/head
Stéphane Bidoul 10 years ago
parent
commit
31f6a200c4
  1. 3
      mis_builder/models/mis_builder.py

3
mis_builder/models/mis_builder.py

@ -196,7 +196,8 @@ class mis_report_kpi(orm.Model):
kpi.divider, kpi.dp,
kpi.suffix, sign='+',
context=context)
elif kpi.compare_method == 'pct' and base_value != 0:
elif kpi.compare_method == 'pct':
if round(base_value, kpi.dp) != 0:
return self._render_num(cr, uid, lang_id,
value / base_value - 1,
0.01, kpi.dp,

Loading…
Cancel
Save