From e4b1403e441dc59bb4038c141799efe5df03c90d Mon Sep 17 00:00:00 2001 From: apa-tiny Date: Tue, 23 Nov 2010 17:45:11 +0530 Subject: [PATCH] [IMP]:account:improved for strip_name function and add rowHeight. bzr revid: apa@tinyerp.com-20101123121511-31jkgmx1kpv22f78 --- addons/account/report/account_general_ledger.py | 9 --------- addons/account/report/account_general_ledger.rml | 8 ++++---- addons/account/report/account_partner_ledger.rml | 9 ++++----- addons/account/report/account_partner_ledger_other.rml | 8 ++++---- 4 files changed, 12 insertions(+), 22 deletions(-) diff --git a/addons/account/report/account_general_ledger.py b/addons/account/report/account_general_ledger.py index 4656987cbeb..891d9ec92b3 100644 --- a/addons/account/report/account_general_ledger.py +++ b/addons/account/report/account_general_ledger.py @@ -86,18 +86,9 @@ class general_ledger(report_sxw.rml_parse, common_report_header): 'get_start_date':self._get_start_date, 'get_end_date':self._get_end_date, 'get_target_move': self._get_target_move, - 'strip_name': self._strip_name, }) self.context = context - def _ellipsis(self, char, size=100, truncation_str='...'): - if len(char) <= size: - return char - return char[:size-len(truncation_str)] + truncation_str - - def _strip_name(self, name, maxlen=50): - return self._ellipsis(name, maxlen) - def _sum_currency_amount_account(self, account): self.cr.execute('SELECT sum(l.amount_currency) AS tot_currency \ FROM account_move_line l \ diff --git a/addons/account/report/account_general_ledger.rml b/addons/account/report/account_general_ledger.rml index 78a5fd35a46..fb37c9bea42 100644 --- a/addons/account/report/account_general_ledger.rml +++ b/addons/account/report/account_general_ledger.rml @@ -274,10 +274,10 @@
[[ repeatIn(get_children_accounts(a), 'o') ]] - [[ data['form']['amount_currency'] == False or removeParentNode('blockTable') ]] + [[ data['form']['amount_currency'] == False or removeParentNode('blockTable') ]] - + [[ '..'*(o.level-1) ]][[ o.code or '']] [[ o.name or '']] @@ -323,10 +323,10 @@
[[ repeatIn(get_children_accounts(a), 'o') ]] - [[ data['form']['amount_currency'] == True or removeParentNode('blockTable') ]] + [[ data['form']['amount_currency'] == True or removeParentNode('blockTable') ]] - + [[ '..'*(o.level-1) ]][[ o.code or '' ]] [[ o.name or '' ]] diff --git a/addons/account/report/account_partner_ledger.rml b/addons/account/report/account_partner_ledger.rml index 96c0612d234..872fc5e0b19 100644 --- a/addons/account/report/account_partner_ledger.rml +++ b/addons/account/report/account_partner_ledger.rml @@ -373,7 +373,7 @@ - [[ display_currency(data) == False or removeParentNode('blockTable') ]] + [[ display_currency(data) == False or removeParentNode('blockTable') ]] @@ -409,7 +409,7 @@
[[ repeatIn(lines(p), 'line') ]] - [[ display_currency(data) == False or removeParentNode('blockTable') ]] + [[ display_currency(data) == False or removeParentNode('blockTable') ]] [[ formatLang(line['date'],date=True) ]] @@ -478,7 +478,7 @@ - [[ display_currency(data) == True or removeParentNode('blockTable') ]] + [[ display_currency(data) == True or removeParentNode('blockTable') ]] @@ -522,7 +522,7 @@
[[ repeatIn(lines(p), 'line') ]] - [[ display_currency(data) == True or removeParentNode('blockTable') ]] + [[ display_currency(data) == True or removeParentNode('blockTable') ]] [[ formatLang(line['date'],date=True) ]] @@ -557,7 +557,6 @@
- diff --git a/addons/account/report/account_partner_ledger_other.rml b/addons/account/report/account_partner_ledger_other.rml index 24ac80dfc38..018152111e0 100644 --- a/addons/account/report/account_partner_ledger_other.rml +++ b/addons/account/report/account_partner_ledger_other.rml @@ -524,7 +524,7 @@
[[ repeatIn(objects, 'p') ]] [[ setLang(p.lang) ]] - [[ display_currency(data) == False or removeParentNode('blockTable') ]] + [[ display_currency(data) == False or removeParentNode('blockTable') ]] @@ -557,7 +557,7 @@
[[ repeatIn(lines(p), 'line') ]] - [[ display_currency(data) == False or removeParentNode('blockTable') ]] + [[ display_currency(data) == False or removeParentNode('blockTable') ]] [[ formatLang(line['date'],date=True) ]] @@ -621,7 +621,7 @@
[[ repeatIn(objects, 'p') ]] [[ setLang(p.lang) ]] - [[ display_currency(data) == True or removeParentNode('blockTable') ]] + [[ display_currency(data) == True or removeParentNode('blockTable') ]] [[ p.ref ]] - [[ p.name ]] @@ -661,7 +661,7 @@
[[ repeatIn(lines(p), 'line') ]] - [[ display_currency(data) == True or removeParentNode('blockTable') ]] + [[ display_currency(data) == True or removeParentNode('blockTable') ]] [[ formatLang(line['date'],date=True) ]]