Browse Source
Add demo data. Set computed result. In instance add target_move (all or posted). Add onchange and check function on report
pull/86/head
Add demo data. Set computed result. In instance add target_move (all or posted). Add onchange and check function on report
pull/86/head
Laetitia Gangloff
10 years ago
committed by
Stéphane Bidoul
9 changed files with 126 additions and 30 deletions
-
6mis_builder/__openerp__.py
-
97mis_builder/models/mis_builder.py
-
19mis_builder/static/src/xml/mis_widget.xml
-
2mis_builder/tests/mis.report.csv
-
2mis_builder/tests/mis.report.instance.csv
-
7mis_builder/tests/mis.report.instance.period.csv
-
7mis_builder/tests/mis.report.kpi.csv
-
2mis_builder/tests/mis.report.query.csv
-
14mis_builder/views/mis_builder.xml
@ -1,17 +1,28 @@ |
|||
<template> |
|||
<t t-name="mis_builder.MisReport"> |
|||
<p>Yo!</p> |
|||
<p> </p> |
|||
<table t-if="widget.mis_report_data"> |
|||
<th> |
|||
<td></td> |
|||
<td t-foreach="widget.mis_report_data.cols" t-as="col" style="padding-right:10px"> |
|||
<th t-foreach="widget.mis_report_data.cols" t-as="col" style="padding-right:10px"> |
|||
<t t-esc="col.name"/> |
|||
</td> |
|||
</th> |
|||
</th> |
|||
<tr t-foreach="widget.mis_report_data.rows" t-as="row"> |
|||
<th> |
|||
<t t-esc="row.name"/> |
|||
<t t-esc="row.description"/> |
|||
</th> |
|||
<td></td> |
|||
<td t-foreach="widget.mis_report_data.cols" t-as="col" style="padding-right:10px"> |
|||
<t t-foreach="col.values" t-as="value"> |
|||
<t t-if="value == row.name"> |
|||
<t t-esc="value_value.val_r"/> |
|||
<t t-if="value_value.val_c"> |
|||
<t t-esc="value_value.val_c"/> |
|||
</t> |
|||
</t> |
|||
</t> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</t> |
@ -0,0 +1,2 @@ |
|||
"id","description","kpi_ids/id","name","query_ids/id" |
|||
"mis_report","","mis_report_kpi_1,mis_report_kpi_2,mis_report_kpi_3,mis_report_kpi_4,mis_report_kpi_5,mis_report_kpi_6","Test","mis_report_query" |
@ -0,0 +1,2 @@ |
|||
"id","date","description","name","period_ids/id","report_id/id" |
|||
"mis_report_instance","2014-07-18","","Test-report-instance","mis_report_instance_period_1,mis_report_instance_period_2,mis_report_instance_period_3,mis_report_instance_period_4,mis_report_instance_period_5,mis_report_instance_period_6","mis_report" |
@ -0,0 +1,7 @@ |
|||
"id","duration","name","offset","type","sequence" |
|||
"mis_report_instance_period_1","1","today","","Day","" |
|||
"mis_report_instance_period_2","1","yesterday","-1","Day","" |
|||
"mis_report_instance_period_3","1","last week","-1","Week","2" |
|||
"mis_report_instance_period_4","2","last 2 period","-2","Fiscal Period","3" |
|||
"mis_report_instance_period_5","2","last 2 week","-2","Week","4" |
|||
"mis_report_instance_period_6","1","yesterday","","Day","1" |
@ -0,0 +1,7 @@ |
|||
"id","compare_method","description","expression","divider","name","dp","sequence","type","suffix" |
|||
"mis_report_kpi_1","Percentage","chiffre d'affaire","-bal_70","","ca","","","Numeric","€" |
|||
"mis_report_kpi_2","Percentage","cost","-bal_60 - bal_61","","cost","","","Numeric","€" |
|||
"mis_report_kpi_3","Percentage","profit","ca - cost","","profit","","","Numeric","€" |
|||
"mis_report_kpi_4","Difference","margin","profit/ca","","margin","","","Percentage","%" |
|||
"mis_report_kpi_5","None","couleur","'vert' if profit > 0 else 'rouge'","","couleur","","","String" |
|||
"mis_report_kpi_6","Percentage","total invoice","len(inv)","","total_invoice","","","Numeric","€" |
@ -0,0 +1,2 @@ |
|||
"id","date_field/id","domain","field_ids/id","model_id/id","name" |
|||
"mis_report_query","account.field_account_invoice_date_invoice","","account.field_account_invoice_amount_untaxed","account.model_account_invoice","inv" |
Write
Preview
Loading…
Cancel
Save
Reference in new issue