Browse Source
[IMP][mis_builder] MIS Builder widget improvement, add print and export button in the widget.
pull/189/head
[IMP][mis_builder] MIS Builder widget improvement, add print and export button in the widget.
pull/189/head
Adrien Peiffer (ACSONE)
9 years ago
committed by
Stéphane Bidoul
6 changed files with 161 additions and 74 deletions
-
24mis_builder/models/mis_builder.py
-
2mis_builder/report/mis_builder_xls.py
-
3mis_builder/report/mis_builder_xlsx.py
-
67mis_builder/static/src/js/mis_builder.js
-
115mis_builder/static/src/xml/mis_widget.xml
-
24mis_builder/views/mis_builder.xml
@ -1,62 +1,67 @@ |
|||
<template> |
|||
<t t-name="mis_builder.MisReport"> |
|||
<p> </p> |
|||
<table t-if="widget.mis_report_data" class="oe_list_content mis_builder"> |
|||
<thead> |
|||
<tr class="oe_list_header_columns"> |
|||
<t t-foreach="widget.mis_report_data.header" t-as="h"> |
|||
<th class="oe_list_header_char"> |
|||
<div class="oe_mis_builder_content"> |
|||
<table t-if="widget.mis_report_data" class="oe_list_content mis_builder"> |
|||
<thead> |
|||
<tr class="oe_list_header_columns"> |
|||
<t t-foreach="widget.mis_report_data.header" t-as="h"> |
|||
<th class="oe_list_header_char"> |
|||
<div> |
|||
<t t-esc="h_value.kpi_name"/> |
|||
</div> |
|||
</th> |
|||
<th t-foreach="h_value.cols" t-as="col" class="oe_list_header_char mis_builder_ralign"> |
|||
<div> |
|||
<t t-esc="col.name"/> |
|||
</div> |
|||
<div> |
|||
<t t-esc="col.date"/> |
|||
</div> |
|||
</th> |
|||
</t> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
<tr t-foreach="widget.mis_report_data.content" t-as="c"> |
|||
<td t-att="{'style': c_value.default_style}"> |
|||
<div> |
|||
<t t-esc="h_value.kpi_name"/> |
|||
</div> |
|||
</th> |
|||
<th t-foreach="h_value.cols" t-as="col" class="oe_list_header_char mis_builder_ralign"> |
|||
<div> |
|||
<t t-esc="col.name"/> |
|||
</div> |
|||
<div> |
|||
<t t-esc="col.date"/> |
|||
</div> |
|||
</th> |
|||
</t> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
<tr t-foreach="widget.mis_report_data.content" t-as="c"> |
|||
<td t-att="{'style': c_value.default_style}"> |
|||
<div> |
|||
<t t-esc="c_value.kpi_name"/> |
|||
</div> |
|||
</td> |
|||
<t t-foreach="c_value.cols" t-as="value"> |
|||
<td t-att="{'style': c_value.default_style}" class="mis_builder_ralign"> |
|||
<div t-att="{'style': value_value.style, 'title': value_value.val_c}"> |
|||
<t t-if="value_value.drilldown"> |
|||
<a href="javascript:void(0)" |
|||
class="mis_builder_drilldown" |
|||
t-att-data-drilldown="JSON.stringify(value_value.drilldown)" |
|||
t-att-data-period-id="JSON.stringify(value_value.period_id)" |
|||
t-att-data-expr="JSON.stringify(value_value.expr)" |
|||
> |
|||
<t t-esc="value_value.val_r"/> |
|||
</a> |
|||
</t> |
|||
<t t-if="!value_value.drilldown"> |
|||
<t t-esc="value_value.val_r"/> |
|||
</t> |
|||
<t t-esc="c_value.kpi_name"/> |
|||
</div> |
|||
</td> |
|||
</t> |
|||
</tr> |
|||
</tbody> |
|||
<tfoot> |
|||
<tr> |
|||
<td class="oe_list_footer" /> |
|||
<t t-foreach="widget.mis_report_data.header" t-as="f"> |
|||
<td t-foreach="f_value.cols" class="oe_list_footer" /> |
|||
</t> |
|||
</tr> |
|||
</tfoot> |
|||
</table> |
|||
<t t-foreach="c_value.cols" t-as="value"> |
|||
<td t-att="{'style': c_value.default_style}" class="mis_builder_ralign"> |
|||
<div t-att="{'style': value_value.style, 'title': value_value.val_c}"> |
|||
<t t-if="value_value.drilldown"> |
|||
<a href="javascript:void(0)" |
|||
class="mis_builder_drilldown" |
|||
t-att-data-drilldown="JSON.stringify(value_value.drilldown)" |
|||
t-att-data-period-id="JSON.stringify(value_value.period_id)" |
|||
t-att-data-expr="JSON.stringify(value_value.expr)" |
|||
> |
|||
<t t-esc="value_value.val_r"/> |
|||
</a> |
|||
</t> |
|||
<t t-if="!value_value.drilldown"> |
|||
<t t-esc="value_value.val_r"/> |
|||
</t> |
|||
</div> |
|||
</td> |
|||
</t> |
|||
</tr> |
|||
</tbody> |
|||
<tfoot> |
|||
<tr> |
|||
<td class="oe_list_footer" /> |
|||
<t t-foreach="widget.mis_report_data.header" t-as="f"> |
|||
<td t-foreach="f_value.cols" class="oe_list_footer" /> |
|||
</t> |
|||
</tr> |
|||
</tfoot> |
|||
</table> |
|||
<div class="oe_mis_builder_buttons"> |
|||
<button class="oe_mis_builder_print"><img src="/web/static/src/img/icons/gtk-print.png"/> Print</button> |
|||
<button class="oe_mis_builder_export"><img src="/web/static/src/img/icons/gtk-execute.png"/>Export</button> |
|||
</div> |
|||
</div> |
|||
</t> |
|||
</template> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue