From 2e6106e80db1a98ef9ffe7210fec99811b252e16 Mon Sep 17 00:00:00 2001 From: apa-tiny Date: Wed, 1 Sep 2010 16:06:32 +0530 Subject: [PATCH] [IMP]:sale,product,account:improved reports. bzr revid: apa@tinyerp.com-20100901103632-8cfhq392e0r1ojhp --- addons/account/project/report/cost_ledger.rml | 45 ++-- .../report/crossovered_analytic.py | 6 +- .../report/crossovered_analytic.rml | 207 ++++++++---------- addons/product/product_report.xml | 2 +- addons/product/report/product_pricelist.py | 7 +- addons/product/report/product_pricelist.rml | 40 ++-- addons/product/wizard/product_price.py | 12 +- addons/product/wizard/product_price_view.xml | 8 +- addons/sale/report/sale_order.rml | 38 +--- 9 files changed, 155 insertions(+), 210 deletions(-) diff --git a/addons/account/project/report/cost_ledger.rml b/addons/account/project/report/cost_ledger.rml index b0f31b93031..2675aa33872 100644 --- a/addons/account/project/report/cost_ledger.rml +++ b/addons/account/project/report/cost_ledger.rml @@ -10,7 +10,7 @@ - + @@ -82,16 +82,16 @@ - - - - - - - + + + + + + + - - + + @@ -115,12 +115,12 @@ - - + + + - - + @@ -137,15 +137,6 @@ - - - - - - - - - @@ -162,13 +153,13 @@ - [[ formatLang(data['form']['date1'],date = True) ]] + [[ formatLang(data['form']['date1'],date = True) ]] - [[ formatLang(data['form']['date2'],date = True) ]] + [[ formatLang(data['form']['date2'],date = True) ]] - [[ formatLang(time.strftime('%Y-%m-%d %H:%M:%S'),date_time = True) ]] + [[ formatLang(time.strftime('%Y-%m-%d %H:%M:%S'),date_time = True) ]] @@ -306,4 +297,4 @@ - + \ No newline at end of file diff --git a/addons/account_analytic_plans/report/crossovered_analytic.py b/addons/account_analytic_plans/report/crossovered_analytic.py index 73fdb629f2c..e064ddc148b 100644 --- a/addons/account_analytic_plans/report/crossovered_analytic.py +++ b/addons/account_analytic_plans/report/crossovered_analytic.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ############################################################################## -# +# # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (). # @@ -15,7 +15,7 @@ # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . +# along with this program. If not, see . # ############################################################################## @@ -169,7 +169,7 @@ class crossovered_analytic(report_sxw.rml_parse): final.append(item) return final -report_sxw.report_sxw('report.account.analytic.account.crossovered.analytic', 'account.analytic.account', 'addons/account_analytic_plans/report/crossovered_analytic.rml',parser = crossovered_analytic, header = False) +report_sxw.report_sxw('report.account.analytic.account.crossovered.analytic', 'account.analytic.account', 'addons/account_analytic_plans/report/crossovered_analytic.rml',parser = crossovered_analytic, header='internal') # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account_analytic_plans/report/crossovered_analytic.rml b/addons/account_analytic_plans/report/crossovered_analytic.rml index df4334d03dd..62e85dd2dad 100644 --- a/addons/account_analytic_plans/report/crossovered_analytic.rml +++ b/addons/account_analytic_plans/report/crossovered_analytic.rml @@ -10,35 +10,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -57,13 +29,8 @@ - - - - - - + @@ -83,55 +50,57 @@ + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - - - + + @@ -142,7 +111,7 @@ - + @@ -154,8 +123,8 @@ - - + + @@ -163,51 +132,65 @@ + - - Crossovered Analytic - [[ company.currency_id.name ]] - [[ company.name ]] - + - + Crossovered Analytic + + + + - From Date + From Date - To Date + To Date - Printing date + Company + + + Currency + + + Printing date - + - [[ data['form']['date1'] ]] + [[ formatLang(data['form']['date1'],date=True) ]] - [[ data['form']['date2'] ]] + [[ formatLang(data['form']['date2'],date=True) ]] - [[ time.strftime('%Y-%m-%d') ]] at [[ time.strftime('%H:%M:%S') ]] + [[ company.name ]] + + + [[ company.currency_id.name ]] + + + [[ formatLang(time.strftime('%Y-%m-%d'),date=True) ]] at [[ time.strftime('%H:%M:%S') ]] - + - Analytic Account Reference: - + Analytic Account Reference: + - + - Account Name + Account Name Code @@ -223,45 +206,39 @@ - - -
- [[ repeatIn(ref_lines(data['form']),'a') ]] - + [[ repeatIn(ref_lines(data['form']),'a') ]] + - - [[ a['ref_name'] ]] - + [[ a['ref_name'] ]] - [[ a['ref_code'] ]] + [[ a['ref_code'] ]] - [[ '%.2f' % a['ref_qty'] ]] + [[ formatLang(a['ref_qty']) ]] - [[ '%.2f' % a['ref_amt'] ]] + [[ formatLang(a['ref_amt']) ]] 100.00% -
- + - Analytic Account : - + Analytic Account : + - + - Account Name + Account Name Code @@ -277,27 +254,24 @@ - - -
- [[ repeatIn(lines(data['form']),'a') ]] - + [[ repeatIn(lines(data['form']),'a') ]] + [[ a['acc_name'] ]] - [[ a['code'] ]] + [[ a['code'] ]] - [[ '%.2f' % a['qty'] ]] + [[formatLang(a['qty']) ]] - [[ '%.2f' % a['amt'] ]] + [[ formatLang(a['amt']) ]] - [[ '%.2f' % a['perc'] ]]% + [[ formatLang(a['perc']) ]]% @@ -305,8 +279,5 @@
- - -
- + \ No newline at end of file diff --git a/addons/product/product_report.xml b/addons/product/product_report.xml index ca4c3f4f356..6135fe64bca 100644 --- a/addons/product/product_report.xml +++ b/addons/product/product_report.xml @@ -4,7 +4,7 @@ ). # @@ -15,7 +15,7 @@ # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . +# along with this program. If not, see . # ############################################################################## @@ -44,7 +44,8 @@ class product_pricelist(report_sxw.rml_parse): qtys = 1 for i in range(1,6): - vals['qty'+str(qtys)] = form['qty'+str(i)] + if form['qty'+str(i)]!=0: + vals['qty'+str(qtys)] = str(form['qty'+str(i)]) + ' units' qtys += 1 lst.append(vals) return lst diff --git a/addons/product/report/product_pricelist.rml b/addons/product/report/product_pricelist.rml index 2deef94a319..65d0c671fa8 100644 --- a/addons/product/report/product_pricelist.rml +++ b/addons/product/report/product_pricelist.rml @@ -1,6 +1,6 @@ -