Browse Source

[IMP] Improve style of Mis report widget buttons. Add report name in the widget.

pull/189/head
Adrien Peiffer (ACSONE) 9 years ago
parent
commit
cccc75d740
  1. 1
      mis_builder/models/mis_builder.py
  2. 5
      mis_builder/static/src/css/custom.css
  3. 13
      mis_builder/static/src/xml/mis_widget.xml

1
mis_builder/models/mis_builder.py

@ -1302,6 +1302,7 @@ class MisReportInstance(models.Model):
compare_col.normalize_factor)
})
return {
'report_name': self.name,
'header': header,
'content': content,
}

5
mis_builder/static/src/css/custom.css

@ -33,4 +33,9 @@
.openerp .oe_mis_builder_buttons {
padding-bottom: 10px;
padding-top: 10px;
}
.oe_mis_builder_content {
padding: 20px;
}

13
mis_builder/static/src/xml/mis_widget.xml

@ -1,12 +1,14 @@
<template>
<t t-name="mis_builder.MisReport">
<div class="oe_mis_builder_content">
<div class="oe_mis_builder_buttons oe_right">
<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-go-down.png"/>Export</button>
<button style="display: none;" class="oe_mis_builder_settings"><img src="/web/static/src/img/icons/gtk-execute.png"/> Settings</button>
<t t-if="widget.mis_report_data">
<h2><t t-esc="widget.mis_report_data.report_name" /></h2>
<div class="oe_mis_builder_buttons oe_right oe_button_box">
<button class="oe_mis_builder_print btn btn-sm oe_button"><img src="/web/static/src/img/icons/gtk-print.png"/> Print</button>
<button class="oe_mis_builder_export btn btn-sm oe_button"><img src="/web/static/src/img/icons/gtk-go-down.png"/>Export</button>
<button style="display: none;" class="oe_mis_builder_settings btn btn-sm oe_button"><img src="/web/static/src/img/icons/gtk-execute.png"/> Settings</button>
</div>
<table t-if="widget.mis_report_data" class="oe_list_content mis_builder">
<table class="oe_list_content mis_builder">
<thead>
<t t-foreach="widget.mis_report_data.header" t-as="h">
<tr class="oe_list_header_columns">
@ -63,6 +65,7 @@
</tr>
</tfoot>
</table>
</t>
</div>
</t>
</template>
Loading…
Cancel
Save