[IMP][mis_builder] Add default style for mis_builder report.
parent
ef660ce894
commit
161e3a34b2
|
@ -4,21 +4,23 @@
|
||||||
|
|
||||||
<template id="report_mis_report_instance">
|
<template id="report_mis_report_instance">
|
||||||
<t t-call="report.html_container">
|
<t t-call="report.html_container">
|
||||||
|
<t t-set="data_report_margin_top" t-value="12"/>
|
||||||
|
<t t-set="data_report_header_spacing" t-value="9"/>
|
||||||
|
<t t-set="data_report_dpi" t-value="110"/>
|
||||||
<t t-foreach="docs" t-as="o">
|
<t t-foreach="docs" t-as="o">
|
||||||
<t t-call="report.internal_layout">
|
|
||||||
<div class="page">
|
<div class="page">
|
||||||
<h2 t-field="o.name"></h2>
|
<h2><span t-field="o.name" /> - <span t-field="o.company_id.name" /></h2>
|
||||||
<table class="table table-condensed">
|
<div class="mis_table">
|
||||||
<thead>
|
<div class="mis_thead">
|
||||||
<t t-foreach="docs_computed[o.id]['header']" t-as="h">
|
<t t-foreach="docs_computed[o.id]['header']" t-as="h">
|
||||||
<tr>
|
<div class="mis_row labels">
|
||||||
<th>
|
<div class="mis_cell">
|
||||||
<div>
|
<div>
|
||||||
<t t-esc="h_value['kpi_name']"/>
|
<t t-esc="h_value['kpi_name']"/>
|
||||||
</div>
|
</div>
|
||||||
</th>
|
</div>
|
||||||
<t t-foreach="h_value['cols']" t-as="col">
|
<t t-foreach="h_value['cols']" t-as="col">
|
||||||
<th class="text-center" t-att-colspan="col.get('colspan', 1)">
|
<div class="mis_cell amount" t-att-colspan="col.get('colspan', 1)">
|
||||||
<div>
|
<div>
|
||||||
<t t-esc="col['name']"/>
|
<t t-esc="col['name']"/>
|
||||||
</div>
|
</div>
|
||||||
|
@ -27,31 +29,47 @@
|
||||||
<t t-esc="col['date']"/>
|
<t t-esc="col['date']"/>
|
||||||
</div>
|
</div>
|
||||||
</t>
|
</t>
|
||||||
</th>
|
</div>
|
||||||
</t>
|
</t>
|
||||||
</tr>
|
</div>
|
||||||
</t>
|
</t>
|
||||||
</thead>
|
</div>
|
||||||
<tbody>
|
<div class="mis_tbody">
|
||||||
<tr t-foreach="docs_computed[o.id]['content']" t-as="c">
|
<div t-foreach="docs_computed[o.id]['content']" t-as="c" class="mis_row lines">
|
||||||
<td t-att-style="c_value['default_style']">
|
<div t-att-style="c_value['default_style']" class="mis_cell">
|
||||||
<div class="text-left">
|
<div class="text-left">
|
||||||
<t t-esc="c_value['kpi_name']"/>
|
<t t-esc="c_value['kpi_name']"/>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</div>
|
||||||
<t t-foreach="c_value['cols']" t-as="value">
|
<t t-foreach="c_value['cols']" t-as="value">
|
||||||
<td t-att-style="c_value['default_style']">
|
<div t-att-style="c_value['default_style']" class="mis_cell">
|
||||||
<div t-att-style="value_value.get('style')" class="text-right">
|
<div t-att-style="value_value.get('style')" class="text-right">
|
||||||
<t t-esc="value_value['val_r']"/>
|
<t t-esc="value_value['val_r']"/>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
|
||||||
</t>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
</div>
|
||||||
</t>
|
</t>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</t>
|
</t>
|
||||||
|
<div class="footer">
|
||||||
|
<div style="border-top: 1px solid black;">
|
||||||
|
<div class="col-xs-3">
|
||||||
|
<span t-esc="context_timestamp(datetime.datetime.now()).strftime('%Y-%m-%d %H:%M')"/>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-2 col-xs-offset-2 text-center">
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-2 col-xs-offset-3 text-right">
|
||||||
|
<ul class="list-inline">
|
||||||
|
Page
|
||||||
|
<li><span class="page"/></li>
|
||||||
|
<li>of</li>
|
||||||
|
<li><span class="topage"/></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</t>
|
</t>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -15,3 +15,22 @@
|
||||||
.openerp .oe_mis_builder_buttons {
|
.openerp .oe_mis_builder_buttons {
|
||||||
padding-bottom: 10px;
|
padding-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.openerp .mis_builder_ralign {
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.openerp .mis_builder a {
|
||||||
|
/* we don't want the link color, to respect user styles */
|
||||||
|
color: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
.openerp .mis_builder a:hover {
|
||||||
|
/* underline links on hover to give a visual cue */
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
.openerp .oe_mis_builder_buttons {
|
||||||
|
padding-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,47 @@
|
||||||
|
.mis_table {
|
||||||
|
display: table ;
|
||||||
|
width: 100%;
|
||||||
|
table-layout: fixed ;
|
||||||
|
}
|
||||||
|
.mis_row {
|
||||||
|
display: table-row ;
|
||||||
|
page-break-inside: avoid;
|
||||||
|
}
|
||||||
|
.mis_cell {
|
||||||
|
display: table-cell ;
|
||||||
|
page-break-inside: avoid;
|
||||||
|
}
|
||||||
|
.mis_thead {
|
||||||
|
display: table-header-group ;
|
||||||
|
}
|
||||||
|
.mis_tbody {
|
||||||
|
display: table-row-group ;
|
||||||
|
}
|
||||||
|
.mis_row.labels {
|
||||||
|
background-color:#F0F0F0 ;
|
||||||
|
}
|
||||||
|
.mis_table, .mis_table .mis_row {
|
||||||
|
border-left:0px;
|
||||||
|
border-right:0px;
|
||||||
|
text-align:left;
|
||||||
|
padding-right:3px;
|
||||||
|
padding-left:3px;
|
||||||
|
padding-top:2px;
|
||||||
|
padding-bottom:2px;
|
||||||
|
border-collapse:collapse;
|
||||||
|
}
|
||||||
|
.mis_table .mis_row.labels, .mis_table .mis_row.lines {
|
||||||
|
border-color:grey ;
|
||||||
|
border-bottom:1px solid lightGrey ;
|
||||||
|
}
|
||||||
|
.mis_table .mis_cell {
|
||||||
|
word-wrap: break-word;
|
||||||
|
}
|
||||||
|
.mis_cell.amount {
|
||||||
|
word-wrap:normal;
|
||||||
|
text-align:right;
|
||||||
|
}
|
||||||
|
.mis_table .mis_cell{
|
||||||
|
padding-left: 5px;
|
||||||
|
/* border-right:1px solid lightGrey; uncomment to active column lines */
|
||||||
|
}
|
|
@ -8,6 +8,11 @@
|
||||||
<script type="text/javascript" src="/mis_builder/static/src/js/mis_builder.js"></script>
|
<script type="text/javascript" src="/mis_builder/static/src/js/mis_builder.js"></script>
|
||||||
</xpath>
|
</xpath>
|
||||||
</template>
|
</template>
|
||||||
|
<template id="assets_report" inherit_id="report.assets_common">
|
||||||
|
<xpath expr="." position="inside">
|
||||||
|
<link href="/mis_builder/static/src/css/report.css" rel="stylesheet"/>
|
||||||
|
</xpath>
|
||||||
|
</template>
|
||||||
|
|
||||||
<record model="ir.ui.view" id="mis_report_view_tree">
|
<record model="ir.ui.view" id="mis_report_view_tree">
|
||||||
<field name="name">mis.report.view.tree</field>
|
<field name="name">mis.report.view.tree</field>
|
||||||
|
|
Loading…
Reference in New Issue