diff --git a/addons/account/report/account_report_common.py b/addons/account/report/account_report_common.py index 8c03ac8e13b..e2ba966e09e 100644 --- a/addons/account/report/account_report_common.py +++ b/addons/account/report/account_report_common.py @@ -56,7 +56,8 @@ class report_account_common(report_sxw.rml_parse, common_report_header): balance = 0.0 name = data['form'].get('account_report_id') and data['form']['account_report_id'][1] or '' report_id = data['form'].get('account_report_id') and data['form']['account_report_id'][0] or False - datas.append({'id': report_id, 'label': data['form']['label_filter'] or ''}) + label = data['form']['label_filter'] or '' + datas.append({'id': report_id, 'label': label}) ctx = self.context.copy() if report_id: child_ids = report_obj.search(cr, uid, [('parent_id','=',report_id)]) @@ -66,7 +67,7 @@ class report_account_common(report_sxw.rml_parse, common_report_header): if child.id == datas[0]['id']: datas[0].update({'name': child.name, 'balance': balance}) else: - datas.append({'id': child.id, 'name': child.name, 'balance': balance}) + datas.append({'id': child.id, 'name': child.name, 'balance': balance, 'label': label}) return datas def get_account_details(self, acc_id, data): diff --git a/addons/account/report/account_report_common.rml b/addons/account/report/account_report_common.rml index 4b3184a9d9e..9c9132a2911 100644 --- a/addons/account/report/account_report_common.rml +++ b/addons/account/report/account_report_common.rml @@ -216,52 +216,46 @@ - - [[ repeatIn(get_report_details(data),'r') ]] - - - - - Report Name - Report Balance - - - [[ r['name'] ]] - [[ formatLang(r['balance']) ]][[ company.currency_id.symbol ]] - - - - - - Accounts - - - - Code - - - Name - - - Balance - - - [[ r['label'] ]] - - - - [[ repeatIn(get_account_details(r['id'], data), 'a') ]] - [[ setTag('tr','tr',{'style': 'Table'+str(min(3,a.level))}) ]] - [[ (a.type =='view' and a.level >= 3) and setTag('para','para',{'style': 'terp_level_3_code_bold'}) or setTag('para','para',{'style': 'terp_level_'+str(min(3,a.level))+'_code'}) ]][[ a.code ]] - [[ (a.type =='view' and a.level >= 3) and setTag('para','para',{'style': 'terp_level_'+str(min(3,a.level))+'_name_bold'}) or setTag('para','para',{'style': 'terp_level_'+str(min(4,a.level))+'_name'}) ]][[ a.name ]] - [[ (a.level <>2) or removeParentNode('td') ]][[ (a.type =='view' and a.level >= 3) and setTag('para','para',{'style': 'terp_level_3_balance_bold'}) or setTag('para','para',{'style': 'terp_level_'+str(min(3,a.level))+'_balance'}) ]][[ formatLang(a.balance) ]] [[company.currency_id.symbol ]] - [[ a.level == 2 or removeParentNode('td') ]][[ formatLang(a.balance) ]] [[company.currency_id.symbol ]] - [[ get_filter(data)!='No Filter' and (a.level <>2) or removeParentNode('td') ]][[ (a.type =='view' and a.level >= 3) and setTag('para','para',{'style': 'terp_level_3_balance_bold'}) or setTag('para','para',{'style': 'terp_level_'+str(min(3,a.level))+'_balance'}) ]][[ formatLang(a.balance) ]] [[company.currency_id.symbol ]] - [[ get_filter(data)!='No Filter' and a.level == 2 or removeParentNode('td') ]][[ formatLang(a.balance) ]] [[company.currency_id.symbol ]] - - - - + [[ repeatIn(get_report_details(data),'r') ]] + + + Report Name + Report Balance + + + [[ r['name'] ]] + [[ formatLang(r['balance']) ]][[ company.currency_id.symbol ]] + + + + + + Accounts + + + + Code + + + Name + + + Balance + + + [[ r['label'] ]] + + + + [[ repeatIn(get_account_details(r['id'], data), 'a') ]] + [[ setTag('tr','tr',{'style': 'Table'+str(min(3,a.level))}) ]] + [[ (a.type =='view' and a.level >= 3) and setTag('para','para',{'style': 'terp_level_3_code_bold'}) or setTag('para','para',{'style': 'terp_level_'+str(min(3,a.level))+'_code'}) ]][[ a.code ]] + [[ (a.type =='view' and a.level >= 3) and setTag('para','para',{'style': 'terp_level_'+str(min(3,a.level))+'_name_bold'}) or setTag('para','para',{'style': 'terp_level_'+str(min(4,a.level))+'_name'}) ]][[ a.name ]] + [[ (a.level <>2) or removeParentNode('td') ]][[ (a.type =='view' and a.level >= 3) and setTag('para','para',{'style': 'terp_level_3_balance_bold'}) or setTag('para','para',{'style': 'terp_level_'+str(min(3,a.level))+'_balance'}) ]][[ formatLang(a.balance) ]] [[company.currency_id.symbol ]] + [[ a.level == 2 or removeParentNode('td') ]][[ formatLang(a.balance) ]] [[company.currency_id.symbol ]] + [[ get_filter(data)!='No Filter' and (a.level <>2) or removeParentNode('td') ]][[ (a.type =='view' and a.level >= 3) and setTag('para','para',{'style': 'terp_level_3_balance_bold'}) or setTag('para','para',{'style': 'terp_level_'+str(min(3,a.level))+'_balance'}) ]][[ formatLang(a.balance) ]] [[company.currency_id.symbol ]] + [[ get_filter(data)!='No Filter' and a.level == 2 or removeParentNode('td') ]][[ formatLang(a.balance) ]] [[company.currency_id.symbol ]] +