diff --git a/addons/account/report/__init__.py b/addons/account/report/__init__.py
index d525d3a331b..7c09027f3ca 100644
--- a/addons/account/report/__init__.py
+++ b/addons/account/report/__init__.py
@@ -41,6 +41,7 @@ import account_entries_report
import account_analytic_entries_report
import account_balance_sheet
import account_profit_loss
+import account_treasury_report
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/account/report/account_balance.py b/addons/account/report/account_balance.py
index 80508ede44b..c3117e60379 100644
--- a/addons/account/report/account_balance.py
+++ b/addons/account/report/account_balance.py
@@ -88,10 +88,10 @@ class account_balance(report_sxw.rml_parse, common_report_header):
}
self.sum_debit += account_rec['debit']
self.sum_credit += account_rec['credit']
- if disp_acc == 'bal_movement':
+ if disp_acc == 'movement':
if not currency_obj.is_zero(self.cr, self.uid, currency, res['credit']) or not currency_obj.is_zero(self.cr, self.uid, currency, res['debit']) or not currency_obj.is_zero(self.cr, self.uid, currency, res['balance']):
self.result_acc.append(res)
- elif disp_acc == 'bal_solde':
+ elif disp_acc == 'not_zero':
if not currency_obj.is_zero(self.cr, self.uid, currency, res['balance']):
self.result_acc.append(res)
else:
diff --git a/addons/account/report/account_balance.rml b/addons/account/report/account_balance.rml
index 7c9aa13da2e..3d971862bdc 100644
--- a/addons/account/report/account_balance.rml
+++ b/addons/account/report/account_balance.rml
@@ -233,7 +233,7 @@
|
[[ get_fiscalyear(data) or '' ]]
|
- [[ (data['form']['display_account']=='bal_all' and 'All') or (data['form']['display_account']=='bal_movement' and 'With movements') or 'With balance is not equal to 0']] |
+ [[ (data['form']['display_account']=='all' and 'All') or (data['form']['display_account']=='movement' and 'With movements') or 'With balance is not equal to 0']] |
[[ get_filter(data)=='No Filter' and get_filter(data) or removeParentNode('para') ]]
[[ get_filter(data)=='Date' or removeParentNode('blockTable') ]]
diff --git a/addons/account/report/account_balance_sheet.py b/addons/account/report/account_balance_sheet.py
index 79bcce882ae..b1e51e6fc46 100644
--- a/addons/account/report/account_balance_sheet.py
+++ b/addons/account/report/account_balance_sheet.py
@@ -137,16 +137,17 @@ class report_balancesheet_horizontal(report_sxw.rml_parse, common_report_header)
'name': account.name,
'level': account.level,
'balance':account.balance,
+ 'type': account.type,
}
currency = account.currency_id and account.currency_id or account.company_id.currency_id
if typ == 'liability' and account.type <> 'view' and (account.debit <> account.credit):
self.result_sum_dr += account.balance
if typ == 'asset' and account.type <> 'view' and (account.debit <> account.credit):
self.result_sum_cr += account.balance
- if data['form']['display_account'] == 'bal_movement':
+ if data['form']['display_account'] == 'movement':
if not currency_pool.is_zero(self.cr, self.uid, currency, account.credit) or not currency_pool.is_zero(self.cr, self.uid, currency, account.debit) or not currency_pool.is_zero(self.cr, self.uid, currency, account.balance):
accounts_temp.append(account_dict)
- elif data['form']['display_account'] == 'bal_solde':
+ elif data['form']['display_account'] == 'not_zero':
if not currency_pool.is_zero(self.cr, self.uid, currency, account.balance):
accounts_temp.append(account_dict)
else:
@@ -163,10 +164,12 @@ class report_balancesheet_horizontal(report_sxw.rml_parse, common_report_header)
for i in range(0,max(len(cal_list['liability']),len(cal_list['asset']))):
if i < len(cal_list['liability']) and i < len(cal_list['asset']):
temp={
+ 'type': cal_list['liability'][i]['type'],
'code': cal_list['liability'][i]['code'],
'name': cal_list['liability'][i]['name'],
'level': cal_list['liability'][i]['level'],
'balance':cal_list['liability'][i]['balance'],
+ 'type1': cal_list['asset'][i]['type'],
'code1': cal_list['asset'][i]['code'],
'name1': cal_list['asset'][i]['name'],
'level1': cal_list['asset'][i]['level'],
@@ -176,10 +179,12 @@ class report_balancesheet_horizontal(report_sxw.rml_parse, common_report_header)
else:
if i < len(cal_list['asset']):
temp={
+ 'type': '',
'code': '',
'name': '',
'level': False,
'balance':False,
+ 'type1': cal_list['asset'][i]['type'],
'code1': cal_list['asset'][i]['code'],
'name1': cal_list['asset'][i]['name'],
'level1': cal_list['asset'][i]['level'],
@@ -188,10 +193,12 @@ class report_balancesheet_horizontal(report_sxw.rml_parse, common_report_header)
self.result_temp.append(temp)
if i < len(cal_list['liability']):
temp={
+ 'type': cal_list['liability'][i]['type'],
'code': cal_list['liability'][i]['code'],
'name': cal_list['liability'][i]['name'],
'level': cal_list['liability'][i]['level'],
'balance':cal_list['liability'][i]['balance'],
+ 'type1': '',
'code1': '',
'name1': '',
'level1': False,
diff --git a/addons/account/report/account_balance_sheet.rml b/addons/account/report/account_balance_sheet.rml
index 680c7d4bb43..205bfff497b 100644
--- a/addons/account/report/account_balance_sheet.rml
+++ b/addons/account/report/account_balance_sheet.rml
@@ -26,7 +26,6 @@
-
@@ -115,7 +114,7 @@
-
+
@@ -124,6 +123,36 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -174,7 +203,7 @@
|
- [[ (data['form']['display_account']=='bal_all' and 'All') or (data['form']['display_account']=='bal_movement' and 'With movements') or 'With balance is not equal to 0']] |
+ [[ (data['form']['display_account']=='all' and 'All') or (data['form']['display_account']=='movement' and 'With movements') or 'With balance is not equal to 0']] |
[[ get_target_move(data) ]] |
@@ -187,35 +216,32 @@
|
- Assets
+ Assets
|
-
+
|
Code
|
- Assets
+ Account
|
Balance
|
-
- |
- [[ repeatIn(get_lines_another('asset'), 'a') ]][[ a['code'] ]][[ a['level']<4 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['level']<4 and ( setTag('para','para',{'style':'terp_default_Right_9_Bold'})) or removeParentNode('font') ]][[ formatLang(abs(a['balance'])) ]] [[ company.currency_id.symbol ]]
- |
+
+ [[ repeatIn(get_lines_another('asset'),'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 ]] |
@@ -224,7 +250,7 @@
Balance:
- [[ formatLang(abs(sum_cr())) ]] [[ company.currency_id.symbol ]]
+ [[ formatLang(sum_cr()) ]] [[ company.currency_id.symbol ]]
|
@@ -235,7 +261,7 @@
|
- Liabilities
+ Liabilities
|
@@ -245,22 +271,19 @@
Code
- Liabilities
+ Account
|
Balance
|
-
- |
- [[ repeatIn(get_lines_another('liability'), 'a') ]][[ a['code'] ]][[ a['level']<4 and ( setTag('para','para',{'style':'terp_default_Bold_9'})) or removeParentNode('font') ]] [[ 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']<4 and ( setTag('para','para',{'style':'terp_default_Right_9_Bold'})) or removeParentNode('font') ]][[ formatLang(abs(a['balance'])) ]] [[ company.currency_id.symbol ]][[ a['name']=='Net Profit' and setTag('para','para',{'style':'terp_default_Right_9_Bold'}) or removeParentNode('font') ]]
- |
+
+ [[ repeatIn(get_lines_another('liability'),'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 ]] |
@@ -269,7 +292,7 @@
Balance:
- [[ formatLang(abs(sum_dr())) ]] [[ company.currency_id.symbol ]]
+ [[ formatLang(sum_dr()) ]] [[ company.currency_id.symbol ]]
|
diff --git a/addons/account/report/account_balance_sheet_horizontal.rml b/addons/account/report/account_balance_sheet_horizontal.rml
index f9942c41b95..7e4f9f844a5 100644
--- a/addons/account/report/account_balance_sheet_horizontal.rml
+++ b/addons/account/report/account_balance_sheet_horizontal.rml
@@ -163,7 +163,7 @@
- [[ (data['form']['display_account']=='bal_all' and 'All') or (data['form']['display_account']=='bal_movement' and 'With movements') or 'With balance is not equal to 0']] |
+ [[ (data['form']['display_account']=='all' and 'All') or (data['form']['display_account']=='movement' and 'With movements') or 'With balance is not equal to 0']] |
[[ get_target_move(data) ]] |
@@ -202,7 +202,7 @@
[[ '. '*(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(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') ]]
@@ -213,7 +213,7 @@
|
[[ 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['code'] and a['name']) and formatLang(a['balance']) or removeParentNode('font')]] [[ company.currency_id.symbol ]]
|
@@ -223,13 +223,13 @@
Balance:
- [[ formatLang(abs(sum_cr())) ]] [[ company.currency_id.symbol ]]
+ [[ formatLang(sum_cr()) ]] [[ company.currency_id.symbol ]]
|
Balance:
|
- [[ formatLang(abs(sum_dr())) ]] [[ company.currency_id.symbol ]]
+ [[ formatLang(sum_dr()) ]] [[ company.currency_id.symbol ]]
|
diff --git a/addons/account/report/account_entries_report_view.xml b/addons/account/report/account_entries_report_view.xml
index baa9e15182b..7426ee2d0cd 100644
--- a/addons/account/report/account_entries_report_view.xml
+++ b/addons/account/report/account_entries_report_view.xml
@@ -87,19 +87,6 @@
-