From 248b0a2311a4ce0fe207a1c8b0d5f040089328f4 Mon Sep 17 00:00:00 2001 From: ced <> Date: Fri, 11 Jan 2008 14:46:45 +0000 Subject: [PATCH] Use formatLang in report bzr revid: ced-cc698e9e95f2d936c1c8c8368be884f2b7f2fa18 --- addons/account/report/account_balance.rml | 121 ++++++++++++------- addons/account/report/aged_trial_balance.rml | 118 ++++++++++++------ addons/account/report/general_ledger.rml | 66 +++++++--- addons/account/report/partner_balance.rml | 115 ++++++++++++++---- addons/account/report/third_party_ledger.rml | 76 ++++++++---- 5 files changed, 358 insertions(+), 138 deletions(-) diff --git a/addons/account/report/account_balance.rml b/addons/account/report/account_balance.rml index 85f3f684526..1daa0d43daa 100644 --- a/addons/account/report/account_balance.rml +++ b/addons/account/report/account_balance.rml @@ -13,22 +13,46 @@ - - - - - - + + + + + + - + + + + + + + + + + + + + - + + + + + + + + + + + + + @@ -37,7 +61,19 @@ - + + + + + + + + + + + + + @@ -45,17 +81,17 @@ - - + + - - - - - - - - + + + + + + + + @@ -64,6 +100,7 @@ + @@ -76,7 +113,7 @@ Account balance - + @@ -86,77 +123,77 @@ [[ company.name ]] - + - Currency: [[ company.currency_id.name ]] + Currency: [[ company.currency_id.name ]] - Printing date: [[ time.strftime('%Y-%m-%d') ]] at [[ time.strftime('%H:%M:%S') ]] - + Printing date: [[ formatLang(time.strftime('%Y-%m-%d'), date=True) ]] at [[ time.strftime('%H:%M:%S') ]] + - Code + Code - Account name + Account name - Transactions + Transactions - Balance + Balance - + - + - Debit + Debit - Credit + Credit - + - + - [[ repeatIn(lines(data['form']), 'a') ]][[ a['code'] ]] + [[ repeatIn(lines(data['form']), 'a') ]][[ a['code'] ]] [[ '. '*(a['level']-1) + a['name'] ]] - [[ a['debit'] and '%.2f' % a['debit'] or '' ]] + [[ formatLang(a['debit']) ]] - [[ a['credit'] and '%.2f' % a['credit'] or '' ]] + [[ formatLang(a['credit']) ]] - [[ '%.2f'% a['balance'] ]] + [[ formatLang(a['balance']) ]] @@ -166,16 +203,16 @@ - Total: + Total: - [[ '%.2f' % sum_debit() ]] + [[ formatLang(sum_debit()) ]] - [[ '%.2f' % sum_credit() ]] + [[ formatLang(sum_credit()) ]] - + diff --git a/addons/account/report/aged_trial_balance.rml b/addons/account/report/aged_trial_balance.rml index a6cf78c6dab..99292838dbe 100644 --- a/addons/account/report/aged_trial_balance.rml +++ b/addons/account/report/aged_trial_balance.rml @@ -13,17 +13,44 @@ - - - - - - + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -32,7 +59,31 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + @@ -45,11 +96,9 @@ - - - - - + + + @@ -59,6 +108,7 @@ + @@ -72,7 +122,7 @@ From the beginning - to [[ data['form']['4']['stop'] ]] + to [[ formatLang(data['form']['4']['stop'], date=True) ]] @@ -92,8 +142,8 @@ - Printing date: [[ time.strftime('%Y-%m-%d') ]] at [[ time.strftime('%H:%M:%S') ]] - + Printing date: [[ formatLang(time.strftime('%Y-%m-%d'), date=True) ]] at [[ time.strftime('%H:%M:%S') ]] + @@ -120,7 +170,7 @@ [[ data['form']['0']['name'] ]] - Before [[ data['form']['0']['start'] ]] + Before [[ formatLang(data['form']['0']['start'], date=True) ]] Total @@ -130,32 +180,32 @@ - [[ repeatIn(get_lines(data['form']), 'partner') ]] - [[ partner['name'] ]] + [[ repeatIn(get_lines(data['form']), 'partner') ]] + [[ partner['name'] ]] [[ partner['ref'] or ' ' ]] - [[ '%.2f' % (partner['4'] or 0.0) ]] + [[ formatLang((partner['4'] or 0.0)) ]] - [[ '%.2f' % (partner['3'] or 0.0) ]] + [[ formatLang((partner['3'] or 0.0)) ]] - [[ '%.2f' % (partner['2'] or 0.0) ]] + [[ formatLang((partner['2'] or 0.0)) ]] - [[ '%.2f' % (partner['1'] or 0.0) ]] + [[ formatLang((partner['1'] or 0.0)) ]] - [[ '%.2f' % (partner['0'] or 0.0) ]] + [[ formatLang((partner['0'] or 0.0)) ]] - [[ '%.2f' % (partner['before'] or 0.0) ]] + [[ formatLang((partner['before'] or 0.0)) ]] - [[ '%.2f' % (partner['total'] or 0.0) ]] + [[ formatLang((partner['total'] or 0.0)) ]] @@ -165,29 +215,29 @@ Account total - [[ '%.2f' % get_for_period(data['form']['4'], data['form']['fiscalyear'], data['form']['company_id']) ]] + [[ formatLang(get_for_period(data['form']['4'], data['form']['fiscalyear'], data['form']['company_id'])) ]] - [[ '%.2f' % get_for_period(data['form']['3'], data['form']['fiscalyear'], data['form']['company_id']) ]] + [[ formatLang(get_for_period(data['form']['3'], data['form']['fiscalyear'], data['form']['company_id'])) ]] - [[ '%.2f' % get_for_period(data['form']['2'], data['form']['fiscalyear'], data['form']['company_id']) ]] + [[ formatLang(get_for_period(data['form']['2'], data['form']['fiscalyear'], data['form']['company_id'])) ]] - [['%.2f' % get_for_period(data['form']['1'], data['form']['fiscalyear'], data['form']['company_id']) ]] + [[ formatLang( get_for_period(data['form']['1'], data['form']['fiscalyear'], data['form']['company_id'])) ]] - [[ '%.2f' % get_for_period(data['form']['0'], data['form']['fiscalyear'], data['form']['company_id']) ]] + [[ formatLang(get_for_period(data['form']['0'], data['form']['fiscalyear'], data['form']['company_id'])) ]] - [[ '%.2f' % get_before(data['form']['0']['start'], data['form']['fiscalyear'], data['form']['company_id']) ]] + [[ formatLang(get_before(data['form']['0']['start'], data['form']['fiscalyear'], data['form']['company_id'])) ]] - [[ '%.2f' % get_total( data['form']['fiscalyear'], data['form']['company_id']) ]] + [[ formatLang(get_total( data['form']['fiscalyear'], data['form']['company_id'])) ]] - + diff --git a/addons/account/report/general_ledger.rml b/addons/account/report/general_ledger.rml index 17c6d22bf1c..44ec036da65 100644 --- a/addons/account/report/general_ledger.rml +++ b/addons/account/report/general_ledger.rml @@ -13,17 +13,38 @@ - - - - - - + + + + + + - + + + + + + + + + + + + + + + + + + + + + + @@ -36,7 +57,19 @@ - + + + + + + + + + + + + + @@ -65,6 +98,7 @@ + @@ -99,7 +133,7 @@ - Printing date: [[ time.strftime('%Y-%m-%d') ]] at [[ time.strftime('%H:%M:%S') ]] + Printing date: [[ formatLang(time.strftime('%Y-%m-%d'), date=True) ]] at [[ time.strftime('%H:%M:%S') ]] @@ -149,13 +183,13 @@ [[ line['name'] ]] - [[ line['debit'] and '%.2f' % line['debit'] or '' ]] + [[ formatLang(line['debit']) ]] - [[ line['credit'] and '%.2f' % line['credit'] or '' ]] + [[ formatLang(line['credit']) ]] - [[ line['progress'] and '%.2f' % line['progress'] or '' ]] + [[ formatLang(line['progress']) ]] @@ -165,10 +199,10 @@ TOTAL ([[ o.code ]]): - [[ '%.2f' % sum_debit_account(o, data['form']) ]] + [[ formatLang(sum_debit_account(o, data['form'])) ]] - [[ '%.2f' % sum_credit_account(o, data['form']) ]] + [[ formatLang(sum_credit_account(o, data['form'])) ]] @@ -190,10 +224,10 @@ TOTAL: - [[ '%.2f' % sum_debit(data['form']) ]] + [[ formatLang(sum_debit(data['form'])) ]] - [[ '%.2f' % sum_credit(data['form']) ]] + [[ formatLang(sum_credit(data['form'])) ]] diff --git a/addons/account/report/partner_balance.rml b/addons/account/report/partner_balance.rml index 8611c37e7d7..c0d9ea67a2c 100644 --- a/addons/account/report/partner_balance.rml +++ b/addons/account/report/partner_balance.rml @@ -13,22 +13,55 @@ - - - - - - + + + + + + - + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + @@ -37,7 +70,38 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -64,6 +128,7 @@ + @@ -76,8 +141,8 @@ Third party balance - From [[ data['form']['date1'] ]] - to [[ data['form']['date2'] ]] + From [[ formatLang(data['form']['date1'], date=True) ]] + to [[ formatLang(data['form']['date2'], date=True) ]] @@ -97,7 +162,7 @@ - Printing date: [[ time.strftime('%Y-%m-%d') ]] at [[ time.strftime('%H:%M:%S') ]] + Printing date: [[ formatLang(time.strftime('%Y-%m-%d'), date=True) ]] at [[ time.strftime('%H:%M:%S') ]] @@ -120,7 +185,7 @@ - + @@ -158,19 +223,19 @@ [[ a['name'] ]] - [[ '%.2f' % a['debit'] ]] + [[ formatLang(a['debit']) ]] - [[ '%.2f' % a['credit'] ]] + [[ formatLang(a['credit']) ]] - [[ '%.2f' % a['sdebit'] ]] + [[ formatLang(a['sdebit']) ]] - [[ '%.2f' % a['scredit'] ]] + [[ formatLang(a['scredit']) ]] - [[ '%.2f' % (a['enlitige'] or 0.0) ]] + [[ formatLang((a['enlitige'] or 0.0)) ]] @@ -183,19 +248,19 @@ Grand total - [[ '%.2f' % sum_debit() ]] + [[ formatLang(sum_debit()) ]] - [[ '%.2f' % sum_credit() ]] + [[ formatLang(sum_credit()) ]] - [[ '%.2f' % sum_sdebit() ]] + [[ formatLang(sum_sdebit()) ]] - [[ '%.2f' % sum_scredit() ]] + [[ formatLang(sum_scredit()) ]] - [[ '%.2f' % sum_litige() ]] + [[ formatLang(sum_litige()) ]] @@ -213,10 +278,10 @@ - [[ '%.2f' % solde_debit() ]] + [[ formatLang(solde_debit()) ]] - [[ '%.2f' % solde_credit() ]] + [[ formatLang(solde_credit()) ]] diff --git a/addons/account/report/third_party_ledger.rml b/addons/account/report/third_party_ledger.rml index 079dfd2e8cd..a44bbb4f2ca 100644 --- a/addons/account/report/third_party_ledger.rml +++ b/addons/account/report/third_party_ledger.rml @@ -13,17 +13,38 @@ - - - - - - + + + + + + - + + + + + + + + + + + + + + + + + + + + + + @@ -36,7 +57,19 @@ - + + + + + + + + + + + + + @@ -64,6 +97,7 @@ + @@ -76,8 +110,8 @@ Third party ledger - From [[ data['form']['date1'] ]] - to [[ data['form']['date2'] ]] + From [[ formatLang(data['form']['date1'], date=True) ]] + to [[ formatLang(data['form']['date2'], date=True) ]] @@ -95,7 +129,7 @@ - Printing date: [[ time.strftime('%Y-%m-%d') ]] at [[ time.strftime('%H:%M:%S') ]] + Printing date: [[ formatLang(time.strftime('%Y-%m-%d'), date=True) ]] at [[ time.strftime('%H:%M:%S') ]] @@ -133,7 +167,7 @@ - [[ repeatIn(lines(p), 'line') ]][[ line['date'] ]] + [[ repeatIn(lines(p), 'line') ]][[ formatLang(line['date'], date=True) ]] [[ line['code'] ]] @@ -145,13 +179,13 @@ [[ line['name'] ]] - [[ line['debit'] and '%.2f' % line['debit'] or '' ]] + [[ formatLang(line['debit']) ]] - [[ line['credit'] and '%.2f' % line['credit'] or '' ]] + [[ formatLang(line['credit']) ]] - [[ line['progress'] and '%.2f' % line['progress'] or '' ]] + [[ formatLang(line['progress']) ]] @@ -164,13 +198,13 @@ - [[ '%.2f' % sum_debit_partner(p) ]] + [[ formatLang(sum_debit_partner(p)) ]] - [[ '%.2f' % sum_credit_partner(p) ]] + [[ formatLang(sum_credit_partner(p)) ]] - [[ '%.2f' %(sum_debit_partner(p) - sum_credit_partner(p)) ]] + [[ formatLang((sum_debit_partner(p) - sum_credit_partner(p))) ]] @@ -187,13 +221,13 @@ Balance brought forward - [[ '%.2f' % sum_debit() ]] + [[ formatLang(sum_debit()) ]] - [[ '%.2f' % sum_credit() ]] + [[ formatLang(sum_credit()) ]] - [[ '%.2f' %(sum_debit() - sum_credit()) ]] + [[ formatLang((sum_debit() - sum_credit())) ]]