From 9f66c83115118803a1ea6d35da56d3bd4aadaf4f Mon Sep 17 00:00:00 2001 From: Jay Vora Date: Fri, 17 Oct 2008 18:06:47 +0530 Subject: [PATCH] Account_report:Added sequence to indicators,sorted on months,better layout,continuos display bzr revid: jvo@tinyerp.com-20081017123647-hvgm9wniefdytpgt --- .../account_report/report/print_indicator.py | 9 ++++----- .../account_report/report/print_indicator.rml | 19 +++++-------------- 2 files changed, 9 insertions(+), 19 deletions(-) diff --git a/addons/account_report/report/print_indicator.py b/addons/account_report/report/print_indicator.py index 71a4890f569..800878ea198 100644 --- a/addons/account_report/report/print_indicator.py +++ b/addons/account_report/report/print_indicator.py @@ -81,7 +81,7 @@ class accounting_report_indicator(report_sxw.rml_parse): if not name=='array': return super(accounting_report_indicator,self).repeatIn(lst, name, nodes_parent=False) - value=['X-Axis'] + value=['Data'] value.extend(self.header_name) type=['string'].extend(['float']*len(self.header_name)) width=[40]*(len(self.header_name)+1) @@ -159,7 +159,7 @@ class accounting_report_indicator(report_sxw.rml_parse): self.header_val=[str(x) for x in self.header_val] temp_dict=zip(self.header_name,self.header_val) res=dict(temp_dict) - res['X-Axis']='Y-Axis' + res['Data']='Value' result.append(res) return result @@ -176,6 +176,7 @@ class accounting_report_indicator(report_sxw.rml_parse): base='period' history_ids=obj_history.search(self.cr,self.uid,[('name','=',object['id']),tuple_search]) + history_ids.sort() obj_his=obj_history.browse(self.cr,self.uid,history_ids) data_val=[] @@ -241,13 +242,11 @@ class accounting_report_indicator(report_sxw.rml_parse): data=zip(self.header_name,self.header_val) - y_min_range=0 - ar = area.T(size = (650,450),x_coord = category_coord.T(data, 0), y_range = (None, None), x_axis = axis.X(label="Period // Year",format="/a-30{}%s"), y_axis = axis.Y(label="Value")) - ar.add_plot(bar_plot.T(data = data,width=15, data_label_format="/o/17{}%s",label = "Value",fill_style=fill_style.red)) + ar.add_plot(bar_plot.T(data = data,width=15, data_label_format="/o/15{}%s",label = "Value",fill_style=fill_style.red)) ar.draw() can.close() diff --git a/addons/account_report/report/print_indicator.rml b/addons/account_report/report/print_indicator.rml index 479eb853424..b535a277fca 100644 --- a/addons/account_report/report/print_indicator.rml +++ b/addons/account_report/report/print_indicator.rml @@ -113,22 +113,23 @@ +
[[ repeatIn(lines(data['form']),'o')]] -[[ o['type']=='view' and setTag('para','para',{'fontName':'Helvetica-Bold'}) ]][[ o['name'] ]] +() [[ o['type']=='view' and setTag('para','para',{'fontName':'Helvetica-Bold'}) ]][[ o['name'] ]] -[[ o['type']=='view' and setTag('para','para',{'fontName':'Helvetica-Bold'}) ]][[ o['code'] ]] +[[ o['type']=='view' and setTag('para','para',{'fontName':'Helvetica-Bold'}) ]][[ o['code'] ]] -[[ o['disp_graph'] and setTag('para','image',{'width':'450.00','height':'200.00','file':test(data['form'],o)}) or removeParentNode('para') ]] +[[ o['disp_graph'] and setTag('para','image',{'width':'450.00','height':'215.00','file':test(data['form'],o)}) or removeParentNode('para') ]] @@ -167,20 +168,10 @@ -[[ o['last'] and removeParentNode('pageBreak')]] - - - -Name[[ o['last'] and removeParentNode('blockTable')]] - - -Code - - - +[[ o['last'] and removeParentNode('para')]][[ '='*92 ]]