From 732779cf4d675f58d17e6e3290cee4a9738c4ca6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul?= Date: Sat, 25 Apr 2015 22:17:08 +0200 Subject: [PATCH] [IMP] mis_builder: links only on cells where drilldown is possible --- mis_builder/models/mis_builder.py | 3 +++ mis_builder/static/src/css/custom.css | 11 +++++++--- mis_builder/static/src/xml/mis_widget.xml | 26 +++++++++++++---------- 3 files changed, 26 insertions(+), 14 deletions(-) diff --git a/mis_builder/models/mis_builder.py b/mis_builder/models/mis_builder.py index d7acf0b3..021ee4e8 100644 --- a/mis_builder/models/mis_builder.py +++ b/mis_builder/models/mis_builder.py @@ -657,6 +657,8 @@ class mis_report_instance_period(orm.Model): except: kpi_style = None + drilldown = bool(aep.get_aml_domain_for_expr(kpi.expression)) + res[kpi.name] = { 'val': kpi_val, 'val_r': kpi_val_rendered, @@ -668,6 +670,7 @@ class mis_report_instance_period(orm.Model): 'is_percentage': kpi.type == 'pct', 'period_id': c.id, 'period_name': c.name, + 'drilldown': drilldown, } if len(recompute_queue) == 0: diff --git a/mis_builder/static/src/css/custom.css b/mis_builder/static/src/css/custom.css index 7969e27d..d436f6c4 100644 --- a/mis_builder/static/src/css/custom.css +++ b/mis_builder/static/src/css/custom.css @@ -1,6 +1,11 @@ -.openerp .ralign { +.mis_builder_ralign { text-align: right; } -.openerp a.mis_builder { - color: #4c4c4c; + +a.mis_builder_drilldown { + color: inherit; +} + +a.mis_builder_drilldown:hover { + text-decoration: underline; } \ No newline at end of file diff --git a/mis_builder/static/src/xml/mis_widget.xml b/mis_builder/static/src/xml/mis_widget.xml index 540f4cf7..a78f5c26 100644 --- a/mis_builder/static/src/xml/mis_widget.xml +++ b/mis_builder/static/src/xml/mis_widget.xml @@ -6,7 +6,7 @@ - +
@@ -25,17 +25,21 @@ - -
- + +
+ + - + + + + +