Browse Source
[IMP] mis_builder: number format are now part of styles
[IMP] mis_builder: number format are now part of styles
Plus a default style at the report level. Plus correct number rendering for comparisons in Excel export.pull/189/head
Stéphane Bidoul
9 years ago
11 changed files with 415 additions and 328 deletions
-
9mis_builder/CHANGES.rst
-
170mis_builder/models/mis_report.py
-
173mis_builder/models/mis_report_style.py
-
22mis_builder/report/mis_report_instance_qweb.xml
-
37mis_builder/report/mis_report_instance_xlsx.py
-
4mis_builder/tests/mis.report.kpi.csv
-
1mis_builder/tests/test_fetch_query.py
-
167mis_builder/tests/test_render.py
-
58mis_builder/views/mis_builder_style.xml
-
22mis_builder/views/mis_report.xml
-
80mis_builder/views/mis_report_style.xml
@ -1,2 +1,2 @@ |
|||||
"id","compare_method","description","expression","divider","name","dp","sequence","type","suffix" |
|
||||
"mis_report_kpi_test","Percentage","total test","len(test)","","total_test","","1","Numeric","" |
|
||||
|
"id","description","expression","name" |
||||
|
"mis_report_kpi_test","total test","len(test)","total_test" |
@ -1,58 +0,0 @@ |
|||||
<?xml version="1.0" encoding="UTF-8"?> |
|
||||
<openerp> |
|
||||
<data> |
|
||||
|
|
||||
<record model="ir.ui.view" id="mis_report_style_view_tree"> |
|
||||
<field name="name">mis.report.style.view.tree</field> |
|
||||
<field name="model">mis.report.style</field> |
|
||||
<field name="arch" type="xml"> |
|
||||
<tree string="MIS Report Styles"> |
|
||||
<field name="name"/> |
|
||||
<field name="color"/> |
|
||||
<field name="background_color"/> |
|
||||
<field name="font_style"/> |
|
||||
<field name="font_weight"/> |
|
||||
<field name="font_size"/> |
|
||||
<field name="indent_level"/> |
|
||||
</tree> |
|
||||
</field> |
|
||||
</record> |
|
||||
|
|
||||
<record id="mis_report_style_view_form" model="ir.ui.view"> |
|
||||
<field name="name">mis.report.style.view.form</field> |
|
||||
<field name="model">mis.report.style</field> |
|
||||
<field name="arch" type="xml"> |
|
||||
<form string="MIS Report Style" version="7.0"> |
|
||||
<sheet> |
|
||||
<group string="Style" col="2"> |
|
||||
<field name="name" /> |
|
||||
</group> |
|
||||
<group string="Color" col="2"> |
|
||||
<field name="color" /> |
|
||||
<field name="background_color" /> |
|
||||
</group> |
|
||||
<group string="Font" col="2"> |
|
||||
<field name="font_style" /> |
|
||||
<field name="font_weight" /> |
|
||||
<field name="font_size" /> |
|
||||
</group> |
|
||||
<group string="Indent"> |
|
||||
<field name="indent_level" /> |
|
||||
</group> |
|
||||
</sheet> |
|
||||
</form> |
|
||||
</field> |
|
||||
</record> |
|
||||
|
|
||||
<record model="ir.actions.act_window" id="mis_report_style_view_action"> |
|
||||
<field name="name">MIS Report Styles</field> |
|
||||
<field name="view_id" ref="mis_report_style_view_tree"/> |
|
||||
<field name="res_model">mis.report.style</field> |
|
||||
<field name="view_type">form</field> |
|
||||
<field name="view_mode">tree,form</field> |
|
||||
</record> |
|
||||
|
|
||||
<menuitem id="mis_report_style_view_menu" parent="account.menu_account_reports" name="MIS Report Styles" action="mis_report_style_view_action" sequence="22"/> |
|
||||
|
|
||||
</data> |
|
||||
</openerp> |
|
@ -0,0 +1,80 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<openerp> |
||||
|
<data> |
||||
|
|
||||
|
<record model="ir.ui.view" id="mis_report_style_view_tree"> |
||||
|
<field name="name">mis.report.style.view.tree</field> |
||||
|
<field name="model">mis.report.style</field> |
||||
|
<field name="arch" type="xml"> |
||||
|
<tree string="MIS Report Styles"> |
||||
|
<field name="name"/> |
||||
|
</tree> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
<record id="mis_report_style_view_form" model="ir.ui.view"> |
||||
|
<field name="name">mis.report.style.view.form</field> |
||||
|
<field name="model">mis.report.style</field> |
||||
|
<field name="arch" type="xml"> |
||||
|
<form string="MIS Report Style" version="7.0"> |
||||
|
<sheet> |
||||
|
<group string="Style" col="2"> |
||||
|
<field name="name" /> |
||||
|
</group> |
||||
|
<group string="Number" col="4"> |
||||
|
<field name="dp_inherit" string="Rounding inherit"/> |
||||
|
<field name="dp" |
||||
|
attrs="{'invisible': [('dp_inherit', '=', True)]}"/> |
||||
|
<field name="divider_inherit" string="Factor inherit"/> |
||||
|
<field name="divider" |
||||
|
attrs="{'invisible': [('divider_inherit', '=', True)]}"/> |
||||
|
<field name="prefix_inherit"/> |
||||
|
<field name="prefix" |
||||
|
attrs="{'invisible': [('prefix_inherit', '=', True)]}"/> |
||||
|
<field name="suffix_inherit"/> |
||||
|
<field name="suffix" |
||||
|
attrs="{'invisible': [('suffix_inherit', '=', True)]}"/> |
||||
|
</group> |
||||
|
<group string="Color" col="4"> |
||||
|
<field name="color_inherit" /> |
||||
|
<field name="color" |
||||
|
attrs="{'invisible': [('color_inherit', '=', True)]}" |
||||
|
widget="color" /> |
||||
|
<field name="background_color_inherit" /> |
||||
|
<field name="background_color" |
||||
|
attrs="{'invisible': [('background_color_inherit', '=', True)]}" |
||||
|
widget="color" /> |
||||
|
</group> |
||||
|
<group string="Font" col="4"> |
||||
|
<field name="font_style_inherit" /> |
||||
|
<field name="font_style" |
||||
|
attrs="{'invisible': [('font_style_inherit', '=', True)]}" /> |
||||
|
<field name="font_weight_inherit" /> |
||||
|
<field name="font_weight" |
||||
|
attrs="{'invisible': [('font_weight_inherit', '=', True)]}" /> |
||||
|
<field name="font_size_inherit" /> |
||||
|
<field name="font_size" |
||||
|
attrs="{'invisible': [('font_size_inherit', '=', True)]}" /> |
||||
|
</group> |
||||
|
<group string="Indent" col="4"> |
||||
|
<field name="indent_level_inherit" /> |
||||
|
<field name="indent_level" |
||||
|
attrs="{'invisible': [('indent_level_inherit', '=', True)]}" /> |
||||
|
</group> |
||||
|
</sheet> |
||||
|
</form> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
<record model="ir.actions.act_window" id="mis_report_style_view_action"> |
||||
|
<field name="name">MIS Report Styles</field> |
||||
|
<field name="view_id" ref="mis_report_style_view_tree"/> |
||||
|
<field name="res_model">mis.report.style</field> |
||||
|
<field name="view_type">form</field> |
||||
|
<field name="view_mode">tree,form</field> |
||||
|
</record> |
||||
|
|
||||
|
<menuitem id="mis_report_style_view_menu" parent="account.menu_account_reports" name="MIS Report Styles" action="mis_report_style_view_action" sequence="22"/> |
||||
|
|
||||
|
</data> |
||||
|
</openerp> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue