From 0886e43811bf581a47b2f2c91150ed6409ea8fa5 Mon Sep 17 00:00:00 2001 From: Bogdan Stanciu Date: Mon, 7 Feb 2011 10:06:40 +0100 Subject: [PATCH] [FIX] legal reports and other reports - data rendering, formatting, translation lp bug: https://launchpad.net/bugs/714427 fixed bzr revid: bogdanovidiu.stanciu@gmail.com-20110207090640-vdy8jybisrjn698d --- .../report/account_aged_partner_balance.rml | 2 +- addons/account/report/account_balance.rml | 2 +- .../account/report/account_balance_sheet.rml | 4 +-- .../account_balance_sheet_horizontal.rml | 36 ++++++++++++------- .../report/account_central_journal.rml | 3 +- .../report/account_general_journal.rml | 2 +- .../account/report/account_general_ledger.rml | 14 ++++---- .../account_general_ledger_landscape.rml | 2 +- addons/account/report/account_journal.rml | 2 +- .../report/account_partner_balance.rml | 2 +- .../account/report/account_partner_ledger.rml | 12 +++---- .../report/account_partner_ledger_other.rml | 12 +++---- .../report/account_profit_horizontal.rml | 10 +++--- addons/account/report/account_profit_loss.rml | 2 +- addons/account/report/common_report_header.py | 6 ++-- 15 files changed, 61 insertions(+), 50 deletions(-) diff --git a/addons/account/report/account_aged_partner_balance.rml b/addons/account/report/account_aged_partner_balance.rml index c76aba31763..ace66af0584 100644 --- a/addons/account/report/account_aged_partner_balance.rml +++ b/addons/account/report/account_aged_partner_balance.rml @@ -112,7 +112,7 @@ - Chart of Account + Chart of Accounts Fiscal Year diff --git a/addons/account/report/account_balance.rml b/addons/account/report/account_balance.rml index 7c9aa13da2e..5f67ea9933a 100644 --- a/addons/account/report/account_balance.rml +++ b/addons/account/report/account_balance.rml @@ -212,7 +212,7 @@ [[ data['model']=='account.account' and 'Company'or removeParentNode('para') ]] - [[ data['model']=='ir.ui.menu' and 'Chart of Account' or removeParentNode('para') ]] + [[ data['model']=='ir.ui.menu' and 'Chart of Accounts' or removeParentNode('para') ]] Fiscal Year diff --git a/addons/account/report/account_balance_sheet.rml b/addons/account/report/account_balance_sheet.rml index 680c7d4bb43..7ad5a4d72f6 100644 --- a/addons/account/report/account_balance_sheet.rml +++ b/addons/account/report/account_balance_sheet.rml @@ -143,9 +143,9 @@ - Chart of Account + Chart of Accounts Fiscal Year - Filter By [[ get_filter(data)!='No Filter' and '' or removeParentNode('font') ]] + Filter By [[ get_filter(data)!='No Filter' and get_filter(data) ]] Display Account Target Moves diff --git a/addons/account/report/account_balance_sheet_horizontal.rml b/addons/account/report/account_balance_sheet_horizontal.rml index f9942c41b95..5f11638f04c 100644 --- a/addons/account/report/account_balance_sheet_horizontal.rml +++ b/addons/account/report/account_balance_sheet_horizontal.rml @@ -132,7 +132,7 @@ - Chart of Account + Chart of Accounts Fiscal Year Filter By [[ get_filter(data)!='No Filter' and get_filter(data) ]] Display Account @@ -196,28 +196,40 @@ - [[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font') ]][[ a['code1'] ]] + + [[ repeatIn(get_lines(),'a' ) ]] [[ a['code1'] ]][[ a['level1']<4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font') ]] + - [[ '. '*(a['level1']-1) ]][[ a['level1']<4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font') ]][[ a['name1'] ]] + + [[ '. '*(a['level1']-1) ]][[ a['level1']<4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font') ]][[ a['name1'] ]] + - [[ a['level1']<4 and ( setTag('para','para',{'style':'terp_default_Right_9_Bold'})) or removeParentNode('font') ]][[ formatLang(abs(a['balance1'])) ]] [[ company.currency_id.symbol ]] + + [[ a['level1']<4 and ( setTag('para','para',{'style':'terp_default_Right_9_Bold'})) or removeParentNode('font') ]][[ formatLang(abs(a['balance1'])) ]] [[ company.currency_id.symbol ]] + - [[ repeatIn(get_lines(), 'a') ]] [[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font') ]][[ a['code'] ]][[ a['name']=='Net Profit' and setTag('para','para',{'style':'terp_default_Bold_9'}) or removeParentNode('font') ]] + + [[ a['code'] ]][[ ( a['level']<4 or a['name']=='Net Profit') and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font') ]] + - [[ '. '*(a['level']-1) ]][[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font') ]][[ a['name'] ]][[ a['name']=='Net Profit' and setTag('para','para',{'style':'terp_default_Bold_9'}) or removeParentNode('font') ]] + + [[ '. '*(a['level']-1) ]] + [[ (a['level']<4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) and a['name']!='Net Profit') or removeParentNode('font') ]][[ a['name'] ]] + - [[ a['level1']<4 and ( setTag('para','para',{'style':'terp_default_Right_9_Bold'})) or removeParentNode('font') ]] -[[ a['name']=='Net Profit' and setTag('para','para',{'style':'terp_default_Right_9_Bold'}) or removeParentNode('font') ]] - [[(a['code'] and a['name']) and formatLang(abs(a['balance'])) or removeParentNode('font')]] [[ company.currency_id.symbol ]] + + [[ ( a['level']<4 or a['name']=='Net Profit') and ( setTag('para','para',{'style':'terp_default_Right_9_Bold'})) or removeParentNode('font') ]] + [[(a['code'] and a['name']) and formatLang(abs(a['balance'])) or removeParentNode('font')]] [[ company.currency_id.symbol ]] + - - - + + + Balance: diff --git a/addons/account/report/account_central_journal.rml b/addons/account/report/account_central_journal.rml index 33566083652..fe064132cbc 100644 --- a/addons/account/report/account_central_journal.rml +++ b/addons/account/report/account_central_journal.rml @@ -235,8 +235,7 @@ - [[ data['model']=='account.journal.period' and 'Company' or removeParentNode('para') ]] - [[ data['model']=='ir.ui.menu' and 'Chart of Account' or removeParentNode('para') ]] + Chart of Accounts Fiscal Year Journal Filter By [[get_filter(data)!='No Filter' and get_filter(data) ]] diff --git a/addons/account/report/account_general_journal.rml b/addons/account/report/account_general_journal.rml index f4cc13069c8..6424a24f8aa 100644 --- a/addons/account/report/account_general_journal.rml +++ b/addons/account/report/account_general_journal.rml @@ -221,7 +221,7 @@ [[ data['model']=='account.journal.period' and 'Company' or removeParentNode('para') ]] - [[ data['model']=='ir.ui.menu' and 'Chart of Account' or removeParentNode('para') ]] + [[ data['model']=='ir.ui.menu' and 'Chart of Accounts' or removeParentNode('para') ]] Fiscal Year Journals Filter By [[ get_filter(data)!='No Filter' and get_filter(data) ]] diff --git a/addons/account/report/account_general_ledger.rml b/addons/account/report/account_general_ledger.rml index 15614444822..7a8454d714a 100644 --- a/addons/account/report/account_general_ledger.rml +++ b/addons/account/report/account_general_ledger.rml @@ -270,7 +270,7 @@ Date - JNRL + JRNL Partner @@ -304,7 +304,7 @@ Date - JNRL + JRNL Partner @@ -344,16 +344,16 @@ - Chart of Account + Chart of Accounts Fiscal Year - Journal + Journals - Filters By [[ get_filter(data)!='No Filter' and get_filter(data) ]] + Filter By [[ get_filter(data)!='No Filter' and get_filter(data) ]] Target Moves @@ -431,7 +431,7 @@ Date - JNRL + JRNL Partner @@ -530,7 +530,7 @@ Date - JNRL + JRNL Partner diff --git a/addons/account/report/account_general_ledger_landscape.rml b/addons/account/report/account_general_ledger_landscape.rml index 22712af0f8c..5ba7e2f47d4 100644 --- a/addons/account/report/account_general_ledger_landscape.rml +++ b/addons/account/report/account_general_ledger_landscape.rml @@ -361,7 +361,7 @@ [[ data['model']=='account.account' and 'Company' or removeParentNode('para') ]] - [[ data['model']=='ir.ui.menu' and 'Chart of Account' or removeParentNode('para') ]] + [[ data['model']=='ir.ui.menu' and 'Chart of Accounts' or removeParentNode('para') ]] Fiscal Year diff --git a/addons/account/report/account_journal.rml b/addons/account/report/account_journal.rml index 9b0ac55bb56..3825eb58d76 100644 --- a/addons/account/report/account_journal.rml +++ b/addons/account/report/account_journal.rml @@ -186,7 +186,7 @@ [[ data['model']=='account.journal.period'and 'Company' or removeParentNode('para') ]] - [[ data['model']=='ir.ui.menu' and 'Chart of Account' or removeParentNode('para') ]] + [[ data['model']=='ir.ui.menu' and 'Chart of Accounts' or removeParentNode('para') ]] Fiscal Year Journal Filters By diff --git a/addons/account/report/account_partner_balance.rml b/addons/account/report/account_partner_balance.rml index 6425d6a4db6..baf43435a44 100644 --- a/addons/account/report/account_partner_balance.rml +++ b/addons/account/report/account_partner_balance.rml @@ -184,7 +184,7 @@ - Chart of Account + Chart of Accounts Fiscal Year Journals Filter By [[ get_filter(data)!='No Filter' and get_filter(data) ]] diff --git a/addons/account/report/account_partner_ledger.rml b/addons/account/report/account_partner_ledger.rml index 69faa977da1..11385b34d71 100644 --- a/addons/account/report/account_partner_ledger.rml +++ b/addons/account/report/account_partner_ledger.rml @@ -280,7 +280,7 @@ Date - JNRL + JRNL Ref @@ -308,7 +308,7 @@ Date - JNRL + JRNL Ref @@ -346,13 +346,13 @@ - Chart of Account + Chart of Accounts Fiscal Year - Journal + Journals Filters By [[ get_filter(data)!='No Filter' and get_filter(data) ]] @@ -443,7 +443,7 @@ Date - JNRL + JRNL Ref @@ -544,7 +544,7 @@ Date - JNRL + JRNL Ref diff --git a/addons/account/report/account_partner_ledger_other.rml b/addons/account/report/account_partner_ledger_other.rml index 22942e15c78..cac5cca0ed6 100644 --- a/addons/account/report/account_partner_ledger_other.rml +++ b/addons/account/report/account_partner_ledger_other.rml @@ -281,7 +281,7 @@ Date - JNRL + JRNL Ref @@ -310,7 +310,7 @@ Date - JNRL + JRNL Ref @@ -347,13 +347,13 @@ - Chart of Account + Chart of Accounts Fiscal Year - Journal + Journals Filters By [[ get_filter(data)!='No Filter' and get_filter(data) ]] @@ -441,7 +441,7 @@ Date - JNRL + JRNL Ref @@ -546,7 +546,7 @@ Date - JNRL + JRNL Ref diff --git a/addons/account/report/account_profit_horizontal.rml b/addons/account/report/account_profit_horizontal.rml index ca444bb4eca..86f0728eb4e 100644 --- a/addons/account/report/account_profit_horizontal.rml +++ b/addons/account/report/account_profit_horizontal.rml @@ -149,7 +149,7 @@ [[ get_data(data) or removeParentNode('para')]] - Chart of Account + Chart of Accounts Fiscal Year Filter By [[ get_filter(data)!='No Filter' and get_filter(data) ]] Display Account @@ -193,7 +193,7 @@ Code - Particular + Expenses Balance @@ -202,7 +202,7 @@ Code - Particular + Income Balance @@ -212,7 +212,7 @@ - [[ repeatIn(get_lines(),'a' ) ]] [[ a['code'] ]][[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font') ]] + [[ repeatIn(get_lines(),'a' ) ]] [[ a['code'] ]][[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font') ]] @@ -234,7 +234,7 @@ - [[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Right_9_Bold'})) or removeParentNode('font') ]][[(a['code1'] and a['name1']) and formatLang(abs(a['balance1'])) or removeParentNode('font') ]] [[ company.currency_id.symbol ]] + [[ a['level1']<4 and ( setTag('para','para',{'style':'terp_default_Right_9_Bold'})) or removeParentNode('font') ]][[(a['code1'] and a['name1']) and formatLang(abs(a['balance1'])) or removeParentNode('font') ]] [[ company.currency_id.symbol ]] diff --git a/addons/account/report/account_profit_loss.rml b/addons/account/report/account_profit_loss.rml index 582885d89dc..f10a5b46783 100644 --- a/addons/account/report/account_profit_loss.rml +++ b/addons/account/report/account_profit_loss.rml @@ -153,7 +153,7 @@ - Chart of Account + Chart of Accounts Fiscal Year Filter By [[ get_filter(data)!='No Filter' and get_filter(data) ]] Display Account diff --git a/addons/account/report/common_report_header.py b/addons/account/report/common_report_header.py index 48e26e839d3..5769248405f 100644 --- a/addons/account/report/common_report_header.py +++ b/addons/account/report/common_report_header.py @@ -94,10 +94,10 @@ class common_report_header(object): def _get_filter(self, data): if data.get('form', False) and data['form'].get('filter', False): if data['form']['filter'] == 'filter_date': - return _('Date') + return 'Date' elif data['form']['filter'] == 'filter_period': - return _('Periods') - return _('No Filter') + return 'Periods' + return 'No Filter' def _sum_debit_period(self, period_id, journal_id=None): journals = journal_id or self.journal_ids